projects
/
ghc-hetmet.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Major patch to fix reporting of unused imports
[ghc-hetmet.git]
/
compiler
/
typecheck
/
TcRnTypes.lhs
diff --git
a/compiler/typecheck/TcRnTypes.lhs
b/compiler/typecheck/TcRnTypes.lhs
index
cbc0fe4
..
c8d7550
100644
(file)
--- a/
compiler/typecheck/TcRnTypes.lhs
+++ b/
compiler/typecheck/TcRnTypes.lhs
@@
-70,6
+70,7
@@
import FastString
import Data.Maybe
import Data.List
import Data.Maybe
import Data.List
+import Data.Set (Set)
\end{code}
\end{code}
@@
-236,8
+237,11
@@
data TcGblEnv
-- The binds, rules and foreign-decl fiels are collected
-- initially in un-zonked form and are finally zonked in tcRnSrcDecls
-- The binds, rules and foreign-decl fiels are collected
-- initially in un-zonked form and are finally zonked in tcRnSrcDecls
- tcg_rn_imports :: Maybe [LImportDecl Name],
tcg_rn_exports :: Maybe [Located (IE Name)],
tcg_rn_exports :: Maybe [Located (IE Name)],
+ tcg_rn_imports :: [LImportDecl Name],
+ -- Keep the renamed imports regardless. They are not
+ -- voluminous and are needed if you want to report unused imports
+ tcg_used_rdrnames :: TcRef (Set RdrName),
tcg_rn_decls :: Maybe (HsGroup Name),
-- ^ Renamed decls, maybe. @Nothing@ <=> Don't retain renamed
-- decls.
tcg_rn_decls :: Maybe (HsGroup Name),
-- ^ Renamed decls, maybe. @Nothing@ <=> Don't retain renamed
-- decls.