From: christiaanb Date: Tue, 22 Jun 2010 09:40:37 +0000 (+0200) Subject: Add comment to DEFAULT alternative simplification X-Git-Url: https://git.stderr.nl/gitweb?p=matthijs%2Fmaster-project%2Fc%CE%BBash.git;a=commitdiff_plain;h=0e1a00f9a5b95f27cc10b3ffaa6533b6f321fd5c Add comment to DEFAULT alternative simplification --- diff --git a/clash/CLasH/Normalize.hs b/clash/CLasH/Normalize.hs index 89f21c0..2778aa2 100644 --- 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"