summaryrefslogtreecommitdiff
path: root/compiler/iface/LoadIface.hs
diff options
context:
space:
mode:
authorEdward Z. Yang <ezyang@cs.stanford.edu>2015-06-11 15:24:27 -0700
committerEdward Z. Yang <ezyang@cs.stanford.edu>2015-06-11 15:37:04 -0700
commitbac927b9770ff769128b66d13a3e72bf5a9bc514 (patch)
treedab91026af349d00b0ff352304091d17359c8d70 /compiler/iface/LoadIface.hs
parent28e04de37151f05c35377ec74ac214d0cfa2f521 (diff)
downloadhaskell-bac927b9770ff769128b66d13a3e72bf5a9bc514.tar.gz
Revert "Support for multiple signature files in scope."
This reverts commit a7524eaed33324e2155c47d4a705bef1d70a2b5b.
Diffstat (limited to 'compiler/iface/LoadIface.hs')
-rw-r--r--compiler/iface/LoadIface.hs18
1 files changed, 6 insertions, 12 deletions
diff --git a/compiler/iface/LoadIface.hs b/compiler/iface/LoadIface.hs
index defaa91c14..c88ad143d4 100644
--- a/compiler/iface/LoadIface.hs
+++ b/compiler/iface/LoadIface.hs
@@ -297,17 +297,12 @@ loadSrcInterface_maybe doc mod want_boot maybe_pkg
-- interface; it will call the Finder again, but the ModLocation will be
-- cached from the first search.
= do { hsc_env <- getTopEnv
+ -- ToDo: findImportedModule should return a list of interfaces
; res <- liftIO $ findImportedModule hsc_env mod maybe_pkg
; case res of
- FoundModule (FoundHs { fr_mod = mod })
- -> fmap (fmap (:[]))
- . initIfaceTcRn
- $ loadInterface doc mod (ImportByUser want_boot)
- FoundSigs mods _backing
- -> initIfaceTcRn $ do
- ms <- forM mods $ \(FoundHs { fr_mod = mod }) ->
- loadInterface doc mod (ImportByUser want_boot)
- return (sequence ms)
+ Found _ mod -> fmap (fmap (:[]))
+ . initIfaceTcRn
+ $ loadInterface doc mod (ImportByUser want_boot)
err -> return (Failed (cannotFindInterface (hsc_dflags hsc_env) mod err)) }
-- | Load interface directly for a fully qualified 'Module'. (This is a fairly
@@ -772,7 +767,7 @@ findAndReadIface doc_str mod hi_boot_file
hsc_env <- getTopEnv
mb_found <- liftIO (findExactModule hsc_env mod)
case mb_found of
- FoundExact loc mod -> do
+ Found loc mod -> do
-- Found file, so read it
let file_path = addBootSuffix_maybe hi_boot_file
@@ -789,8 +784,7 @@ findAndReadIface doc_str mod hi_boot_file
traceIf (ptext (sLit "...not found"))
dflags <- getDynFlags
return (Failed (cannotFindInterface dflags
- (moduleName mod)
- (convFindExactResult err)))
+ (moduleName mod) err))
where read_file file_path = do
traceIf (ptext (sLit "readIFace") <+> text file_path)
read_result <- readIface mod file_path