Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
GHC
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
alexbiehl-gc
GHC
Commits
87b55b6f
Commit
87b55b6f
authored
24 years ago
by
Julian Seward
Browse files
Options
Downloads
Patches
Plain Diff
[project @ 2000-10-12 09:15:42 by sewardj]
TLA renaming.
parent
11673fb3
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
ghc/compiler/ghci/CmFind.lhs
+12
-11
12 additions, 11 deletions
ghc/compiler/ghci/CmFind.lhs
ghc/compiler/ghci/CmStaticInfo.lhs
+5
-5
5 additions, 5 deletions
ghc/compiler/ghci/CmStaticInfo.lhs
with
17 additions
and
16 deletions
ghc/compiler/ghci/CmFind.lhs
+
12
−
11
View file @
87b55b6f
...
...
@@ -17,15 +17,16 @@ import Time ( ClockTime )
import Directory ( doesFileExist, getModificationTime )
import Outputable
import Module ( Module, ModuleName, PackageName )
import CmStaticInfo ( PCI(..), Package(..) )
import Module ( Module, ModuleName, PackageName,
moduleNameUserString )
import CmStaticInfo ( Package(..), PackageConfigInfo(..) )
\end{code}
\begin{code}
-- make a product type, with Maybe return --> Module,lhs
data ModLocation
= SourceOnly ModuleName
Path
-- .hs
| ObjectCode ModuleName Path Path -- .o, .hi
= SourceOnly ModuleName
FilePath
-- .hs
| ObjectCode ModuleName
File
Path
File
Path -- .o, .hi
| InPackage ModuleName PackageName
| NotFound
...
...
@@ -52,8 +53,8 @@ isPackageLoc _ = False
mkFinder :: [(ModuleName,PackageName,FilePath)] -> [FilePath] -> Finder
mkFinder pkg_ifaces home_dirs modnm
= do found <- mkFinderX pkg_ifaces home_dirs modnm
putStrLn ("FINDER: request = " ++ modnm ++ "\n" ++
"FINDER: response = " ++ showSDoc (ppr found))
--
putStrLn ("FINDER: request = " ++ modnm ++ "\n" ++
--
"FINDER: response = " ++ showSDoc (ppr found))
return found
...
...
@@ -71,8 +72,8 @@ mkFinderX pkg_ifaces home_dirs modnm
((pkgname,path):_, [])
-> return (InPackage modnm pkgname)
(packages, locs_n_times)
-> do hPutStr stderr ( "GHCI: warning: module `" ++ modnm ++
"' appears as both a home and package module\n")
-> do
--
hPutStr stderr ( "GHCI: warning: module `" ++ modnm ++
--
"' appears as both a home and package module\n")
return (homeMod locs_n_times)
where
in_package
...
...
@@ -103,7 +104,7 @@ homeModuleExists modname path
where
object thi to = Just (ObjectCode modname nm_o nm_hi, max thi to)
source ths = Just (SourceOnly modname nm_hs, ths)
nm = path ++ "/" ++ modname
nm = path ++ "/" ++
moduleNameUserString
modname
nm_hs = nm ++ ".hs"
nm_hi = nm ++ ".hi"
nm_o = nm ++ ".o"
...
...
@@ -122,8 +123,8 @@ homeModuleExists modname path
newFinder :: FilePath{-temp debugging hack-}
-> P
CI
-> IO Finder
-> P
ackageConfigInfo
-> IO Finder
newFinder path pci
= return (mkFinder (
module_
table pci) [path])
= return (mkFinder (
pci_mod
table pci) [path])
\end{code}
This diff is collapsed.
Click to expand it.
ghc/compiler/ghci/CmStaticInfo.lhs
+
5
−
5
View file @
87b55b6f
...
...
@@ -4,7 +4,7 @@
\section[CmStaticInfo]{Session-static info for the Compilation Manager}
\begin{code}
module CmStaticInfo ( Package(..), P
CI
(..), mkPCI )
module CmStaticInfo ( Package(..), P
ackageConfigInfo
(..), mkPCI )
where
#include "HsVersions.h"
...
...
@@ -41,11 +41,11 @@ data Package
}
deriving Read
mkPCI :: [Package] -> IO P
CI
mkPCI :: [Package] -> IO P
ackageConfigInfo
mkPCI raw_package_info
= do mtab <- mk_module_table raw_package_info
return (P
CI
{ pci_rawinfo = raw_package_info,
pci_modtable = mtab })
return (P
ackageConfigInfo
{ pci_rawinfo = raw_package_info,
pci_modtable = mtab })
mk_module_table :: [Package] -> IO [(ModuleName,PackageName,FilePath)]
mk_module_table raw_info
...
...
@@ -63,7 +63,7 @@ mk_module_table raw_info
return iface_table
where
fsifyStrings (mod_str, pkg_str, path_str)
= (
mkFastString mod_str, mkFastString
pkg_str, path_str)
= (
_PK_ mod_str, _PK_
pkg_str, path_str)
-- nm_and_paths :: Package -> [(PkgName,Path)]
nm_and_paths package
= [(name package, path) | path <- nub (import_dirs package)]
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment