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:
bc062e2
)
Add comment to DEFAULT alternative simplification
author
christiaanb
<christiaan.baaij@gmail.com>
Tue, 22 Jun 2010 09:40:37 +0000
(11:40 +0200)
committer
christiaanb
<christiaan.baaij@gmail.com>
Tue, 22 Jun 2010 09:40:37 +0000
(11:40 +0200)
clash/CLasH/Normalize.hs
patch
|
blob
|
history
diff --git
a/clash/CLasH/Normalize.hs
b/clash/CLasH/Normalize.hs
index 89f21c00ef0ecf83661a8a6248b5ae6b758d69d4..2778aa22057250a10ed65f92fb3d818495c5181e 100644
(file)
--- a/
clash/CLasH/Normalize.hs
+++ b/
clash/CLasH/Normalize.hs
@@
-493,6
+493,8
@@
casesimpl c expr@(Case scrut bndr ty alts) | not bndr_used = do
doalt alt@(DEFAULT, [], expr) = do
local_var <- Trans.lift $ is_local_var expr
repr <- isRepr expr
+ -- Extract any expressions that is not a local var already and is
+ -- representable (to prevent loops with inlinenonrep).
(exprbinding_maybe, expr') <- if (not local_var) && repr
then do
id <- Trans.lift $ mkBinderFor expr "caseval"