summaryrefslogtreecommitdiff
path: root/compiler/iface
diff options
context:
space:
mode:
authorSimon Marlow <marlowsd@gmail.com>2008-12-02 13:37:36 +0000
committerSimon Marlow <marlowsd@gmail.com>2008-12-02 13:37:36 +0000
commit25ed0cf7d4c2fbf9e455405f0a8525e0ae27b4e7 (patch)
tree4f8771323f84294de1ef53e61fbd8bb2ce294e8f /compiler/iface
parent95a05693c2ba2d15c1010a0cb9234484ada447cd (diff)
downloadhaskell-25ed0cf7d4c2fbf9e455405f0a8525e0ae27b4e7.tar.gz
Put full ImportDecls in ModSummary instead of just ModuleNames
... and use it to make ghc -M generate correct cross-package dependencies when using package-qualified imports (needed for the new build system). Since we're already parsing the ImportDecl from the source file, there seems no good reason not to keep it in the ModSummary, it might be useful for other things too.
Diffstat (limited to 'compiler/iface')
-rw-r--r--compiler/iface/MkIface.lhs5
1 files changed, 3 insertions, 2 deletions
diff --git a/compiler/iface/MkIface.lhs b/compiler/iface/MkIface.lhs
index 97449b712b..4976e1fc8f 100644
--- a/compiler/iface/MkIface.lhs
+++ b/compiler/iface/MkIface.lhs
@@ -67,6 +67,7 @@ import TcType
import InstEnv
import FamInstEnv
import TcRnMonad
+import HsSyn
import HscTypes
import Finder
import DynFlags
@@ -1115,8 +1116,8 @@ checkDependencies hsc_env summary iface
orM = foldr f (return False)
where f m rest = do b <- m; if b then return True else rest
- dep_missing (L _ mod) = do
- find_res <- liftIO $ findImportedModule hsc_env mod Nothing
+ dep_missing (L _ (ImportDecl (L _ mod) pkg _ _ _ _)) = do
+ find_res <- liftIO $ findImportedModule hsc_env mod pkg
case find_res of
Found _ mod
| pkg == this_pkg