From 0e1a00f9a5b95f27cc10b3ffaa6533b6f321fd5c Mon Sep 17 00:00:00 2001 From: christiaanb Date: Tue, 22 Jun 2010 11:40:37 +0200 Subject: [PATCH] Add comment to DEFAULT alternative simplification --- clash/CLasH/Normalize.hs | 2 ++ 1 file changed, 2 insertions(+) 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" -- 2.30.2