projects
/
matthijs
/
master-project
/
cλash.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Really revert all of the recent rotating changes.
[matthijs/master-project/cλash.git]
/
clash
/
CLasH
/
Normalize.hs
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
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"
(exprbinding_maybe, expr') <- if (not local_var) && repr
then do
id <- Trans.lift $ mkBinderFor expr "caseval"