diff options
| author | simonpj@microsoft.com <unknown> | 2010-11-18 09:00:57 +0000 |
|---|---|---|
| committer | simonpj@microsoft.com <unknown> | 2010-11-18 09:00:57 +0000 |
| commit | df10461445770a67289c911420a4871b1404dfe3 (patch) | |
| tree | b460dbcace70174606ae382a225257682b9fa4ec | |
| parent | 2e1b8326e9c98e29664447223ab1321bdbad621d (diff) | |
| download | haskell-df10461445770a67289c911420a4871b1404dfe3.tar.gz | |
Fix the generation of in-scope variables for IfaceLint check
| -rw-r--r-- | compiler/iface/TcIface.lhs | 16 |
1 files changed, 9 insertions, 7 deletions
diff --git a/compiler/iface/TcIface.lhs b/compiler/iface/TcIface.lhs index 431b3a72f1..8fff412265 100644 --- 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 - , 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 @@ -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 - ; 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) ++ - typeEnvIds type_env) }}}} + rec_ids) } \end{code} |
