projects
/
matthijs
/
master-project
/
cλash.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
b79c61e
)
Actually make the scrutinee binder removal not crash.
author
Matthijs Kooijman
<matthijs@stdin.nl>
Wed, 11 Nov 2009 13:38:26 +0000
(14:38 +0100)
committer
Matthijs Kooijman
<matthijs@stdin.nl>
Wed, 11 Nov 2009 13:38:26 +0000
(14:38 +0100)
cλash/CLasH/Normalize.hs
patch
|
blob
|
history
diff --git
a/cλash/CLasH/Normalize.hs
b/cλash/CLasH/Normalize.hs
index 4f02800547b729e7cc405c5d4990c366c284b4cb..2c7a95e16b99b25987f13d8de875f498ae780ef0 100644
(file)
--- a/
cλash/CLasH/Normalize.hs
+++ b/
cλash/CLasH/Normalize.hs
@@
-419,6
+419,8
@@
scrutbndrremove (Case (Var scrut) bndr ty alts) | bndr_used = do
expr' <- substitute bndr (Var scrut) expr
return (con, bndrs, expr')
wild = MkCore.mkWildBinder (Id.idType bndr)
+-- Leave all other expressions unchanged
+scrutbndrremove expr = return expr
scrutbndrremovetop = everywhere ("scrutbndrremove", scrutbndrremove)
--------------------------------