projects
/
ghc-hetmet.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
133d090
)
Comment on the commoning up of CoPats in Match
author
simonpj@microsoft.com
<unknown>
Wed, 6 Sep 2006 11:42:23 +0000
(11:42 +0000)
committer
simonpj@microsoft.com
<unknown>
Wed, 6 Sep 2006 11:42:23 +0000
(11:42 +0000)
compiler/deSugar/Match.lhs
patch
|
blob
|
history
diff --git
a/compiler/deSugar/Match.lhs
b/compiler/deSugar/Match.lhs
index
2d64633
..
d793343
100644
(file)
--- a/
compiler/deSugar/Match.lhs
+++ b/
compiler/deSugar/Match.lhs
@@
-745,6
+745,10
@@
sameGroup (PgN l1) (PgN l2) = True -- Needs conditionals
sameGroup (PgNpK l1) (PgNpK l2) = l1==l2 -- Order is significant
-- See Note [Order of n+k]
sameGroup (PgCo t1) (PgCo t2) = t1 `coreEqType` t2
+ -- CoPats are in the same goup only if the type of the
+ -- enclosed pattern is the same. The patterns outside the CoPat
+ -- always have the same type, so this boils down to saying that
+ -- the two coercions are identical.
sameGroup _ _ = False
patGroup :: Pat Id -> PatGroup