[commit: ghc] type-nats: Limit debugging output to when there's something to report. (3cbfe4f)
Iavor Diatchki <[email protected]> Tue, 25 Dec 2012 21:05:34 -0800
| Newsgroups | gmane.comp.lang.haskell.cvs.ghc |
|---|---|
| Message-ID | <[email protected]> |
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 <[email protected]> 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)