Commit 0b06d68d authored by Simon Peyton Jones's avatar Simon Peyton Jones

Improve constraint solver depth error slightly

parent 419af69c
......@@ -1196,11 +1196,11 @@ are created by in RtClosureInspect.zonkRTTIType.
solverDepthErrorTcS :: Ct -> TcM a
solverDepthErrorTcS ct
= setCtLoc loc $
do { ct <- zonkCt ct
do { pred <- zonkTcType (ctPred ct)
; env0 <- tcInitTidyEnv
; let tidy_env = tidyFreeTyVars env0 (tyVarsOfCt ct)
tidy_ct = tidyCt tidy_env ct
; failWithTcM (tidy_env, hang msg 2 (ppr tidy_ct)) }
; let tidy_env = tidyFreeTyVars env0 (tyVarsOfType pred)
tidy_pred = tidyType tidy_env pred
; failWithTcM (tidy_env, hang msg 2 (ppr tidy_pred)) }
where
loc = cc_loc ct
depth = ctLocDepth loc
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment