summaryrefslogtreecommitdiff
path: root/ghc/compiler/compMan/CmLink.lhs
diff options
context:
space:
mode:
authorsewardj <unknown>2000-11-20 11:39:57 +0000
committersewardj <unknown>2000-11-20 11:39:57 +0000
commitc7955cf7e34273b5ec624dae0015cec677624c6c (patch)
tree4806d0c17d9c848c4ed398b44d7cd317017f442a /ghc/compiler/compMan/CmLink.lhs
parent7897eb8d1f077874022e6ba1f69ff3c3d59a83d9 (diff)
downloadhaskell-c7955cf7e34273b5ec624dae0015cec677624c6c.tar.gz
[project @ 2000-11-20 11:39:57 by sewardj]
* (CompManager) recompile if in interactive mode and no old linkable exists * (HscMain) don't write interface files in interactive mode * (everywhere) switch arg order to unJust for PAP purposes
Diffstat (limited to 'ghc/compiler/compMan/CmLink.lhs')
-rw-r--r--ghc/compiler/compMan/CmLink.lhs11
1 files changed, 6 insertions, 5 deletions
diff --git a/ghc/compiler/compMan/CmLink.lhs b/ghc/compiler/compMan/CmLink.lhs
index 44f9a89ef6..f478dcc94e 100644
--- a/ghc/compiler/compMan/CmLink.lhs
+++ b/ghc/compiler/compMan/CmLink.lhs
@@ -6,7 +6,7 @@
\begin{code}
module CmLink ( Linkable(..), Unlinked(..),
filterModuleLinkables,
- findModuleLinkable,
+ findModuleLinkable_maybe,
modname_of_linkable, is_package_linkable,
LinkResult(..),
link,
@@ -62,11 +62,12 @@ data LinkResult
= LinkOK PersistentLinkerState
| LinkErrs PersistentLinkerState [SDoc]
-findModuleLinkable :: [Linkable] -> ModuleName -> Linkable
-findModuleLinkable lis mod
+findModuleLinkable_maybe :: [Linkable] -> ModuleName -> Maybe Linkable
+findModuleLinkable_maybe lis mod
= case [LM nm us | LM nm us <- lis, nm == mod] of
- [li] -> li
- other -> pprPanic "findModuleLinkable" (ppr mod)
+ [] -> Nothing
+ [li] -> Just li
+ many -> pprPanic "findModuleLinkable" (ppr mod)
emptyPLS :: IO PersistentLinkerState