summaryrefslogtreecommitdiff
path: root/compiler/deSugar/Match.lhs
diff options
context:
space:
mode:
authorManuel M T Chakravarty <chak@cse.unsw.edu.au>2006-09-20 17:39:27 +0000
committerManuel M T Chakravarty <chak@cse.unsw.edu.au>2006-09-20 17:39:27 +0000
commit0b86bc9b022a5965d2b35f143ff4b919f784e676 (patch)
tree4b30b70cb9847a8eb6036092b375319623c583db /compiler/deSugar/Match.lhs
parent6fcf90065dc4e75b7dc6bbf238a9891a71ae5a86 (diff)
downloadhaskell-0b86bc9b022a5965d2b35f143ff4b919f784e676.tar.gz
fix bugs, add boolean flag to identify coercion variables
Mon Sep 18 16:41:32 EDT 2006 Manuel M T Chakravarty <chak@cse.unsw.edu.au> * fix bugs, add boolean flag to identify coercion variables Sun Aug 6 17:04:02 EDT 2006 Manuel M T Chakravarty <chak@cse.unsw.edu.au> * fix bugs, add boolean flag to identify coercion variables Tue Jul 25 06:20:05 EDT 2006 kevind@bu.edu
Diffstat (limited to 'compiler/deSugar/Match.lhs')
-rw-r--r--compiler/deSugar/Match.lhs5
1 files changed, 4 insertions, 1 deletions
diff --git a/compiler/deSugar/Match.lhs b/compiler/deSugar/Match.lhs
index d793343e41..9ff15487ec 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