[commit: ghc] master: Improve constraint solver depth error slightly (0b06d68)

Simon Peyton Jones <[email protected]>
Newsgroups gmane.comp.lang.haskell.cvs.ghc
Message-ID <[email protected]>
Repository : ssh://darcs.haskell.org//srv/darcs/ghc

On branch  : master

http://hackage.haskell.org/trac/ghc/changeset/0b06d68d22679eb6a29cb8b789004af1cea61847

>---------------------------------------------------------------

commit 0b06d68d22679eb6a29cb8b789004af1cea61847
Author: Simon Peyton Jones <[email protected]>
Date:   Wed Oct 3 08:13:46 2012 +0100

    Improve constraint solver depth error slightly

>---------------------------------------------------------------

 compiler/typecheck/TcErrors.lhs |    8 ++++----
 1 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/compiler/typecheck/TcErrors.lhs b/compiler/typecheck/TcErrors.lhs
index 4f95abc..0fb0194 100644
--- a/compiler/typecheck/TcErrors.lhs
+++ b/compiler/typecheck/TcErrors.lhs
@@ -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
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.