diff options
author | Edward Z. Yang <ezyang@cs.stanford.edu> | 2015-10-08 15:03:01 -0700 |
---|---|---|
committer | Edward Z. Yang <ezyang@cs.stanford.edu> | 2015-10-09 10:29:12 -0700 |
commit | e5baf62dfac7fd81acc2bd570ba7d3b1fedd8363 (patch) | |
tree | 3cf68147df2b53c604b03dd94f1c48d416dc1d20 /compiler/main/GhcMake.hs | |
parent | c7ab79952e3fd0654108909fc372e4df5ffff91e (diff) | |
download | haskell-e5baf62dfac7fd81acc2bd570ba7d3b1fedd8363.tar.gz |
Simplify type of ms_srcimps and ms_textual_imps.
Summary:
Previously, we stored an entire ImportDecl, which was pretty
wasteful since all we really cared about was the package qualifier
and the module name.
Signed-off-by: Edward Z. Yang <ezyang@cs.stanford.edu>
Test Plan: validate
Reviewers: bgamari, austin
Subscribers: thomie
Differential Revision: https://phabricator.haskell.org/D1317
Diffstat (limited to 'compiler/main/GhcMake.hs')
-rw-r--r-- | compiler/main/GhcMake.hs | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/compiler/main/GhcMake.hs b/compiler/main/GhcMake.hs index 3d29b1d38e..123cc9e212 100644 --- a/compiler/main/GhcMake.hs +++ b/compiler/main/GhcMake.hs @@ -34,10 +34,8 @@ import ErrUtils import Finder import GhcMonad import HeaderInfo -import HsSyn import HscTypes import Module -import RdrName ( RdrName ) import TcIface ( typecheckIface ) import TcRnMonad ( initIfaceCheck ) @@ -1720,9 +1718,9 @@ msDeps s = then [ (noLoc (moduleName (ms_mod s)), IsBoot) ] else [] -home_imps :: [Located (ImportDecl RdrName)] -> [Located ModuleName] -home_imps imps = [ ideclName i | L _ i <- imps, - isLocal (fmap sl_fs $ ideclPkgQual i) ] +home_imps :: [(Maybe FastString, Located ModuleName)] -> [Located ModuleName] +home_imps imps = [ lmodname | (mb_pkg, lmodname) <- imps, + isLocal mb_pkg ] where isLocal Nothing = True isLocal (Just pkg) | pkg == fsLit "this" = True -- "this" is special isLocal _ = False |