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:
8d022fe
)
Make SpecConstr "look through" identity coercions
author
simonpj@microsoft.com
<unknown>
Thu, 25 Nov 2010 17:21:38 +0000
(17:21 +0000)
committer
simonpj@microsoft.com
<unknown>
Thu, 25 Nov 2010 17:21:38 +0000
(17:21 +0000)
compiler/specialise/SpecConstr.lhs
patch
|
blob
|
history
diff --git
a/compiler/specialise/SpecConstr.lhs
b/compiler/specialise/SpecConstr.lhs
index
cbe1c0b
..
0b61a57
100644
(file)
--- a/
compiler/specialise/SpecConstr.lhs
+++ b/
compiler/specialise/SpecConstr.lhs
@@
-1549,6
+1549,9
@@
argToPat env in_scope val_env (Case scrut _ _ [(_, _, rhs)]) arg_occ
-}
argToPat env in_scope val_env (Cast arg co) arg_occ
+ | isIdentityCoercion co -- Substitution in the SpecConstr itself
+ -- can lead to identity coercions
+ = argToPat env in_scope val_env arg arg_occ
| not (ignoreType env ty2)
= do { (interesting, arg') <- argToPat env in_scope val_env arg arg_occ
; if not interesting then