Repository : ssh://darcs.haskell.org//srv/darcs/ghc

On branch  : type-nats

http://hackage.haskell.org/trac/ghc/changeset/3cbfe4fe27d5e1fbc396506a8dd86d634796c3cf

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

commit 3cbfe4fe27d5e1fbc396506a8dd86d634796c3cf
Author: Iavor S. Diatchki <iavor.diatc...@gmail.com>
Date:   Tue Dec 25 20:57:07 2012 -0800

    Limit debugging output to when there's something to report.

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

 compiler/typecheck/TcTypeNats.hs |    7 ++++---
 1 files changed, 4 insertions(+), 3 deletions(-)

diff --git a/compiler/typecheck/TcTypeNats.hs b/compiler/typecheck/TcTypeNats.hs
index c1586f9..96ddd05 100644
--- a/compiler/typecheck/TcTypeNats.hs
+++ b/compiler/typecheck/TcTypeNats.hs
@@ -982,7 +982,7 @@ computeNewGivenWork :: Ct -> TcS [Ct]
 computeNewGivenWork ct =
   do (bad,good) <- interactCt True ct =<< getFacts
 
-     when (null bad) $
+     when (null bad && not (null good)) $
        do natTrace "New givens:" (vcat $ map ppr good)
           updWorkListTcS (extendWorkListCts good)
 
@@ -995,9 +995,10 @@ Returns any obvious contradictions that we found. -}
 -- XXX: We should probably be using the deived constraints here too
 computeNewDerivedWork :: Ct -> TcS [Ct]
 computeNewDerivedWork ct =
-  do (bad,good) <- interactCt False ct =<< getEvCt
+  do asmps <- getEvCt
+     (bad,good) <- interactCt False ct asmps -- =<< getEvCt
 
-     when (null bad) $
+     when (null bad && not (null good)) $
        do natTrace "New derived:" (vcat $ map ppr good)
           updWorkListTcS (extendWorkListCts good)
 



_______________________________________________
Cvs-ghc mailing list
Cvs-ghc@haskell.org
http://www.haskell.org/mailman/listinfo/cvs-ghc

Reply via email to