projects
/
ghc-hetmet.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
90fecc3
)
[project @ 2000-10-16 15:21:48 by simonmar]
author
simonmar
<unknown>
Mon, 16 Oct 2000 15:21:48 +0000
(15:21 +0000)
committer
simonmar
<unknown>
Mon, 16 Oct 2000 15:21:48 +0000
(15:21 +0000)
add some comments
ghc/compiler/main/Finder.lhs
patch
|
blob
|
history
diff --git
a/ghc/compiler/main/Finder.lhs
b/ghc/compiler/main/Finder.lhs
index
8408501
..
b345755
100644
(file)
--- a/
ghc/compiler/main/Finder.lhs
+++ b/
ghc/compiler/main/Finder.lhs
@@
-27,9
+27,22
@@
import IO
import Monad
\end{code}
import Monad
\end{code}
+The Finder provides a thin filesystem abstraction to the rest of the
+compiler. For a given module, it knows (a) which package the module
+lives in, so it can make a Module from a ModuleName, and (b) where the
+source, interface, and object files for a module live.
+
\begin{code}
type Finder = ModuleName -> IO (Maybe (Module, ModuleLocation))
\begin{code}
type Finder = ModuleName -> IO (Maybe (Module, ModuleLocation))
+-- For a module in another package, the hs_file and obj_file
+-- components of ModuleLocation are undefined.
+
+-- The locations specified by a ModuleLocation may or may not
+-- correspond to actual files yet: for example, even if the object
+-- file doesn't exist, the ModuleLocation still contains the path to
+-- where the object file will reside if/when it is created.
+
data ModuleLocation
= ModuleLocation {
hs_file :: FilePath,
data ModuleLocation
= ModuleLocation {
hs_file :: FilePath,