summaryrefslogtreecommitdiff
path: root/compiler/GHC/Iface/Env.hs
diff options
context:
space:
mode:
Diffstat (limited to 'compiler/GHC/Iface/Env.hs')
-rw-r--r--compiler/GHC/Iface/Env.hs9
1 files changed, 6 insertions, 3 deletions
diff --git a/compiler/GHC/Iface/Env.hs b/compiler/GHC/Iface/Env.hs
index a67fdfe334..d0a1a38199 100644
--- a/compiler/GHC/Iface/Env.hs
+++ b/compiler/GHC/Iface/Env.hs
@@ -193,9 +193,12 @@ setNameModule (Just m) n =
tcIfaceLclId :: FastString -> IfL Id
tcIfaceLclId occ
= do { lcl <- getLclEnv
- ; case (lookupFsEnv (if_id_env lcl) occ) of
+ ; case lookupFsEnv (if_id_env lcl) occ of
Just ty_var -> return ty_var
- Nothing -> failIfM (text "Iface id out of scope: " <+> ppr occ)
+ Nothing -> failIfM $
+ vcat
+ [ text "Iface id out of scope: " <+> ppr occ
+ , text "env:" <+> ppr (if_id_env lcl) ]
}
extendIfaceIdEnv :: [Id] -> IfL a -> IfL a
@@ -209,7 +212,7 @@ extendIfaceIdEnv ids
tcIfaceTyVar :: FastString -> IfL TyVar
tcIfaceTyVar occ
= do { lcl <- getLclEnv
- ; case (lookupFsEnv (if_tv_env lcl) occ) of
+ ; case lookupFsEnv (if_tv_env lcl) occ of
Just ty_var -> return ty_var
Nothing -> failIfM (text "Iface type variable out of scope: " <+> ppr occ)
}