X-Git-Url: http://git.megacz.com/?a=blobdiff_plain;f=compiler%2FdeSugar%2FMatch.lhs;h=9ff15487ec938d1796d0e7ce4cf10eafbc5c411f;hb=27ca67931713c36f5ed248de88298416892e5649;hp=d793343e4177b8ec2180e7420265ab8d05fcc8c6;hpb=3cec5683766a13019c2835a4e79cc7e7dc066b96;p=ghc-hetmet.git diff --git a/compiler/deSugar/Match.lhs b/compiler/deSugar/Match.lhs index d793343..9ff1548 100644 --- a/compiler/deSugar/Match.lhs +++ b/compiler/deSugar/Match.lhs @@ -254,7 +254,7 @@ match :: [Id] -- Variables rep'ing the exprs we're matching with -> DsM MatchResult -- Desugared result! match [] ty eqns - = ASSERT( not (null eqns) ) + = ASSERT2( not (null eqns), ppr ty ) returnDs (foldr1 combineMatchResults match_results) where match_results = [ ASSERT( null (eqn_pats eqn) ) @@ -715,6 +715,9 @@ data PatGroup groupEquations :: [EquationInfo] -> [[(PatGroup, EquationInfo)]] +-- If the result is of form [g1, g2, g3], +-- (a) all the (pg,eq) pairs in g1 have the same pg +-- (b) none of the gi are empty groupEquations eqns = runs same_gp [(patGroup (firstPat eqn), eqn) | eqn <- eqns] where