summaryrefslogtreecommitdiff
path: root/compiler/GHC/Rename/Names.hs
diff options
context:
space:
mode:
Diffstat (limited to 'compiler/GHC/Rename/Names.hs')
-rw-r--r--compiler/GHC/Rename/Names.hs5
1 files changed, 4 insertions, 1 deletions
diff --git a/compiler/GHC/Rename/Names.hs b/compiler/GHC/Rename/Names.hs
index 677e695420..d339a841cc 100644
--- a/compiler/GHC/Rename/Names.hs
+++ b/compiler/GHC/Rename/Names.hs
@@ -385,7 +385,9 @@ rnImportDecl this_mod
warnUnqualifiedImport decl iface
let new_imp_decl = L loc (decl { ideclExt = noExtField, ideclSafe = mod_safe'
- , ideclHiding = new_imp_details })
+ , ideclHiding = new_imp_details
+ , ideclName = ideclName decl
+ , ideclAs = ideclAs decl })
return (new_imp_decl, gbl_env, imports, mi_hpc iface)
@@ -1393,6 +1395,7 @@ findImportUsage imports used_gres
import_usage :: ImportMap
import_usage = mkImportMap used_gres
+ unused_decl :: LImportDecl GhcRn -> (LImportDecl GhcRn, [GlobalRdrElt], [Name])
unused_decl decl@(L loc (ImportDecl { ideclHiding = imps }))
= (decl, used_gres, nameSetElemsStable unused_imps)
where