summaryrefslogtreecommitdiff
path: root/compiler/iface
diff options
context:
space:
mode:
authorSimon Peyton Jones <simonpj@microsoft.com>2015-06-03 11:43:53 +0100
committerSimon Peyton Jones <simonpj@microsoft.com>2015-06-03 11:46:17 +0100
commit7ea156ae3e1c66e59935f0eb877ea1a3f3bfd5b9 (patch)
tree9fe22f362259b215ab39b527c97558a143118131 /compiler/iface
parent7b6800c5ab62cb10b3c1b7a85e40c77897cc366f (diff)
downloadhaskell-7ea156ae3e1c66e59935f0eb877ea1a3f3bfd5b9.tar.gz
Refactor RdrName.Provenance, to fix #7672
Trac #7672 has a data type T in module A that is in scope *both* locally-bound *and* imported (with a qualified) name. The Provenance of a GlobalRdrElt simply couldn't express that before. Now you can. In doing so, I flattened out Provenance into GlobalRdrElt, so quite a lot of modules are touched in a not-very-interesting way.
Diffstat (limited to 'compiler/iface')
-rw-r--r--compiler/iface/IfaceEnv.hs8
1 files changed, 5 insertions, 3 deletions
diff --git a/compiler/iface/IfaceEnv.hs b/compiler/iface/IfaceEnv.hs
index 0a13fc468c..1bd931674f 100644
--- a/compiler/iface/IfaceEnv.hs
+++ b/compiler/iface/IfaceEnv.hs
@@ -73,9 +73,11 @@ newGlobalBinder :: Module -> OccName -> SrcSpan -> TcRnIf a b Name
newGlobalBinder mod occ loc
= do { mod `seq` occ `seq` return () -- See notes with lookupOrig
--- ; traceIf (text "newGlobalBinder" <+> ppr mod <+> ppr occ <+> ppr loc)
- ; updNameCacheTcRn $ \name_cache ->
- allocateGlobalBinder name_cache mod occ loc }
+ ; name <- updNameCacheTcRn $ \name_cache ->
+ allocateGlobalBinder name_cache mod occ loc
+ ; traceIf (text "newGlobalBinder" <+>
+ (vcat [ ppr mod <+> ppr occ <+> ppr loc, ppr name]))
+ ; return name }
newInteractiveBinder :: HscEnv -> OccName -> SrcSpan -> IO Name
-- Works in the IO monad, and gets the Module