projects
/
ghc-hetmet.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
2e1b832
)
Fix the generation of in-scope variables for IfaceLint check
author
simonpj@microsoft.com
<unknown>
Thu, 18 Nov 2010 09:00:57 +0000
(09:00 +0000)
committer
simonpj@microsoft.com
<unknown>
Thu, 18 Nov 2010 09:00:57 +0000
(09:00 +0000)
compiler/iface/TcIface.lhs
patch
|
blob
|
history
diff --git
a/compiler/iface/TcIface.lhs
b/compiler/iface/TcIface.lhs
index
431b3a7
..
8fff412
100644
(file)
--- a/
compiler/iface/TcIface.lhs
+++ b/
compiler/iface/TcIface.lhs
@@
-1103,7
+1103,9
@@
tcPragExpr name expr
Just fail_msg -> do { mod <- getIfModule
; pprPanic "Iface Lint failure"
(vcat [ ptext (sLit "In interface for") <+> ppr mod
Just fail_msg -> do { mod <- getIfModule
; pprPanic "Iface Lint failure"
(vcat [ ptext (sLit "In interface for") <+> ppr mod
- , hang doc 2 fail_msg ]) }
+ , hang doc 2 fail_msg
+ , ppr name <+> equals <+> ppr core_expr'
+ , ptext (sLit "Iface expr =") <+> ppr expr ]) }
return core_expr'
where
doc = text "Unfolding of" <+> ppr name
return core_expr'
where
doc = text "Unfolding of" <+> ppr name
@@
-1111,14
+1113,14
@@
tcPragExpr name expr
get_in_scope :: IfL [Var] -- Totally disgusting; but just for linting
get_in_scope
= do { (gbl_env, lcl_env) <- getEnvs
get_in_scope :: IfL [Var] -- Totally disgusting; but just for linting
get_in_scope
= do { (gbl_env, lcl_env) <- getEnvs
- ; setLclEnv () $ do
- { case if_rec_types gbl_env of {
- Nothing -> return [] ;
- Just (_, get_env) -> do
- { type_env <- get_env
+ ; rec_ids <- case if_rec_types gbl_env of
+ Nothing -> return []
+ Just (_, get_env) -> do
+ { type_env <- setLclEnv () get_env
+ ; return (typeEnvIds type_env) }
; return (varEnvElts (if_tv_env lcl_env) ++
varEnvElts (if_id_env lcl_env) ++
; return (varEnvElts (if_tv_env lcl_env) ++
varEnvElts (if_id_env lcl_env) ++
- typeEnvIds type_env) }}}}
+ rec_ids) }
\end{code}
\end{code}