From 7ea156ae3e1c66e59935f0eb877ea1a3f3bfd5b9 Mon Sep 17 00:00:00 2001 From: Simon Peyton Jones Date: Wed, 3 Jun 2015 11:43:53 +0100 Subject: 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. --- compiler/deSugar/DsMonad.hs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'compiler/deSugar') diff --git a/compiler/deSugar/DsMonad.hs b/compiler/deSugar/DsMonad.hs index ee5c6e9569..ad6a6b1d7b 100644 --- a/compiler/deSugar/DsMonad.hs +++ b/compiler/deSugar/DsMonad.hs @@ -258,7 +258,7 @@ loadModule doc mod Succeeded iface -> return $ mkGlobalRdrEnv . gresFromAvails prov . mi_exports $ iface } } where - prov = Imported [ImpSpec { is_decl = imp_spec, is_item = ImpAll }] + prov = Just (ImpSpec { is_decl = imp_spec, is_item = ImpAll }) imp_spec = ImpDeclSpec { is_mod = name, is_qual = True, is_dloc = wiredInSrcSpan, is_as = name } name = moduleName mod -- cgit v1.2.1