[commit: ghc] master: Improve ASSERT (b67f503)

git at git.haskell.org git at git.haskell.org
Wed Dec 4 13:41:20 UTC 2013


Repository : ssh://git@git.haskell.org/ghc

On branch  : master
Link       : http://ghc.haskell.org/trac/ghc/changeset/b67f50350e6d15049ba2110b31dd63f20db27746/ghc

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

commit b67f50350e6d15049ba2110b31dd63f20db27746
Author: Simon Peyton Jones <simonpj at microsoft.com>
Date:   Mon Dec 2 16:49:57 2013 +0000

    Improve ASSERT


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

b67f50350e6d15049ba2110b31dd63f20db27746
 compiler/basicTypes/Demand.lhs |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/compiler/basicTypes/Demand.lhs b/compiler/basicTypes/Demand.lhs
index 42590c9..cd844a1 100644
--- a/compiler/basicTypes/Demand.lhs
+++ b/compiler/basicTypes/Demand.lhs
@@ -437,7 +437,7 @@ seqMaybeUsed _          = ()
 splitUseProdDmd :: Int -> UseDmd -> [MaybeUsed]
 splitUseProdDmd n Used          = replicate n useTop
 splitUseProdDmd n UHead         = replicate n Abs
-splitUseProdDmd n (UProd ds)    = ASSERT( ds `lengthIs` n ) ds
+splitUseProdDmd n (UProd ds)    = ASSERT2( ds `lengthIs` n, ppr n $$ ppr ds ) ds
 splitUseProdDmd _ d@(UCall _ _) = pprPanic "attempt to prod-split usage call demand" (ppr d)
 \end{code}
   



More information about the ghc-commits mailing list