diff options
Diffstat (limited to 'compiler/iface/IfaceEnv.hs')
-rw-r--r-- | compiler/iface/IfaceEnv.hs | 23 |
1 files changed, 3 insertions, 20 deletions
diff --git a/compiler/iface/IfaceEnv.hs b/compiler/iface/IfaceEnv.hs index 581aa1f393..46bc0e9905 100644 --- a/compiler/iface/IfaceEnv.hs +++ b/compiler/iface/IfaceEnv.hs @@ -255,27 +255,10 @@ extendIfaceEnvs tcvs thing_inside ************************************************************************ -} +-- | Look up a top-level name from the current Iface module lookupIfaceTop :: OccName -> IfL Name --- Look up a top-level name from the current Iface module -lookupIfaceTop occ = do - lcl_env <- getLclEnv - -- NB: this is a semantic module, see - -- Note [Identity versus semantic module] - mod <- getIfModule - case if_nsubst lcl_env of - -- NOT substNameShape because 'getIfModule' returns the - -- renamed module (d'oh!) - Just nsubst -> - case lookupOccEnv (ns_map nsubst) occ of - Just n' -> - -- I thought this would be help but it turns out - -- n' doesn't have any useful information. Drat! - -- return (setNameLoc n' (nameSrcSpan n)) - return n' - -- This case can occur when we encounter a DFun; - -- see Note [Bogus DFun renamings] - Nothing -> lookupOrig mod occ - _ -> lookupOrig mod occ +lookupIfaceTop occ + = do { env <- getLclEnv; lookupOrig (if_mod env) occ } newIfaceName :: OccName -> IfL Name newIfaceName occ |