diff options
author | Edward Z. Yang <ezyang@cs.stanford.edu> | 2015-07-21 17:16:52 -0700 |
---|---|---|
committer | Edward Z. Yang <ezyang@cs.stanford.edu> | 2015-07-22 13:04:04 -0700 |
commit | dd365b1baab08b44e8feb1715ecacf7407628d5c (patch) | |
tree | ba5e2ed7383898053b29dd5dc0ffda5be3ecfc3a /compiler/iface/LoadIface.hs | |
parent | 939f1b2ed3c7a9e6ca7150d8c26a555c5b23a20c (diff) | |
download | haskell-dd365b1baab08b44e8feb1715ecacf7407628d5c.tar.gz |
Use lookupIfaceTop for loading IfaceDecls.
Summary:
It's shorter! And then when Backpack overrides lookupIfaceTop
everyone will see the right information.
Signed-off-by: Edward Z. Yang <ezyang@cs.stanford.edu>
Test Plan: validate
Reviewers: simonpj, austin, bgamari
Subscribers: thomie
Differential Revision: https://phabricator.haskell.org/D1090
Diffstat (limited to 'compiler/iface/LoadIface.hs')
-rw-r--r-- | compiler/iface/LoadIface.hs | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/compiler/iface/LoadIface.hs b/compiler/iface/LoadIface.hs index ad813578c4..9da1175a5d 100644 --- a/compiler/iface/LoadIface.hs +++ b/compiler/iface/LoadIface.hs @@ -585,20 +585,18 @@ loadDecls :: Bool -> [(Fingerprint, IfaceDecl)] -> IfL [(Name,TyThing)] loadDecls ignore_prags ver_decls - = do { mod <- getIfModule - ; thingss <- mapM (loadDecl ignore_prags mod) ver_decls + = do { thingss <- mapM (loadDecl ignore_prags) ver_decls ; return (concat thingss) } loadDecl :: Bool -- Don't load pragmas into the decl pool - -> Module -> (Fingerprint, IfaceDecl) -> IfL [(Name,TyThing)] -- The list can be poked eagerly, but the -- TyThings are forkM'd thunks -loadDecl ignore_prags mod (_version, decl) +loadDecl ignore_prags (_version, decl) = do { -- Populate the name cache with final versions of all -- the names associated with the decl - main_name <- lookupOrig mod (ifName decl) + main_name <- lookupIfaceTop (ifName decl) -- Typecheck the thing, lazily -- NB. Firstly, the laziness is there in case we never need the @@ -671,7 +669,7 @@ loadDecl ignore_prags mod (_version, decl) Nothing -> pprPanic "loadDecl" (ppr main_name <+> ppr n $$ ppr (decl)) - ; implicit_names <- mapM (lookupOrig mod) (ifaceDeclImplicitBndrs decl) + ; implicit_names <- mapM lookupIfaceTop (ifaceDeclImplicitBndrs decl) -- ; traceIf (text "Loading decl for " <> ppr main_name $$ ppr implicit_names) ; return $ (main_name, thing) : |