summaryrefslogtreecommitdiff
path: root/compiler/ghci/RtClosureInspect.hs
diff options
context:
space:
mode:
authorpepe iborra <mnislaih@gmail.com>2009-03-03 19:37:06 +0000
committerpepe iborra <mnislaih@gmail.com>2009-03-03 19:37:06 +0000
commit43213e90f8f17b0fd55f030aac64453249a3af16 (patch)
treeb38add5e5aed98678b4d4aaf04031471f2f55044 /compiler/ghci/RtClosureInspect.hs
parent371d661d6fcdae01b6b4f04b916a842e9fe7fc76 (diff)
downloadhaskell-43213e90f8f17b0fd55f030aac64453249a3af16.tar.gz
Fix #3067: GHCi panics with 'initTc:LIE' while :stepping on code with funny types
The problem is that calls to boxyUnify would panic if the types involved contained type functions. It looks like one should wrap these calls with getLIE, although I don't really know what I am doing here
Diffstat (limited to 'compiler/ghci/RtClosureInspect.hs')
-rw-r--r--compiler/ghci/RtClosureInspect.hs4
1 files changed, 2 insertions, 2 deletions
diff --git a/compiler/ghci/RtClosureInspect.hs b/compiler/ghci/RtClosureInspect.hs
index beb7b58b35..a003fc3da4 100644
--- a/compiler/ghci/RtClosureInspect.hs
+++ b/compiler/ghci/RtClosureInspect.hs
@@ -585,7 +585,7 @@ addConstraint actual expected = do
recoverTR (traceTR $ fsep [text "Failed to unify", ppr actual,
text "with", ppr expected])
(congruenceNewtypes actual expected >>=
- uncurry boxyUnify >> return ())
+ (getLIE . uncurry boxyUnify) >> return ())
-- TOMDO: what about the coercion?
-- we should consider family instances
@@ -842,7 +842,7 @@ improveRTTIType hsc_env _ty rtti_ty = runTR_maybe hsc_env $ do
(ty_tvs, _, _) <- tcInstType return ty
(ty_tvs', _, ty') <- tcInstType (mapM tcInstTyVar) ty
(_, _, rtti_ty') <- tcInstType (mapM tcInstTyVar) (sigmaType rtti_ty)
- boxyUnify rtti_ty' ty'
+ getLIE(boxyUnify rtti_ty' ty')
tvs1_contents <- zonkTcTyVars ty_tvs'
let subst = (uncurry zipTopTvSubst . unzip)
[(tv,ty) | (tv,ty) <- zip ty_tvs tvs1_contents