[commit: ghc] master: Add an ASSERT (e52d9d4)

Simon Peyton Jones <[email protected]> Fri, 04 Jan 2013 02:31:43 -0800
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/e52d9d462f373a15f56c09628f9c22f4cbb92021

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

commit e52d9d462f373a15f56c09628f9c22f4cbb92021
Author: Simon Peyton Jones <[email protected]>
Date:   Fri Jan 4 10:30:26 2013 +0000

    Add an ASSERT

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

 compiler/typecheck/TcPat.lhs |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/compiler/typecheck/TcPat.lhs b/compiler/typecheck/TcPat.lhs
index 548a11d..a1aac01 100644
--- a/compiler/typecheck/TcPat.lhs
+++ b/compiler/typecheck/TcPat.lhs
@@ -350,7 +350,8 @@ tc_lpats :: PatEnv
        	 -> TcM a	
        	 -> TcM ([LPat TcId], a)
 tc_lpats penv pats tys thing_inside 
-  =  tcMultiple (\(p,t) -> tc_lpat p t) 
+  = ASSERT2( equalLength pats tys, ppr pats $$ ppr tys )
+    tcMultiple (\(p,t) -> tc_lpat p t) 
                 (zipEqual "tc_lpats" pats tys)
                 penv thing_inside