From: Matthijs Kooijman Date: Fri, 14 Aug 2009 13:51:29 +0000 (+0200) Subject: Let casesimpl generate non-recursive lets. X-Git-Url: https://git.stderr.nl/gitweb?a=commitdiff_plain;h=3820c30b0c8ec3c26ae849b9b047d9e862bd4551;p=matthijs%2Fmaster-project%2Fc%CE%BBash.git Let casesimpl generate non-recursive lets. --- diff --git "a/c\316\273ash/CLasH/Normalize.hs" "b/c\316\273ash/CLasH/Normalize.hs" index cd3ba58..bade853 100644 --- "a/c\316\273ash/CLasH/Normalize.hs" +++ "b/c\316\273ash/CLasH/Normalize.hs" @@ -308,7 +308,7 @@ casesimpl expr@(Case scrut b ty alts) = do (bindingss, alts') <- (Monad.liftM unzip) $ mapM doalt alts let bindings = concat bindingss -- Replace the case with a let with bindings and a case - let newlet = (Let (Rec bindings) (Case scrut b ty alts')) + let newlet = mkNonRecLets bindings (Case scrut b ty alts') -- If there are no non-wild binders, or this case is already a simple -- selector (i.e., a single alt with exactly one binding), already a simple -- selector altan no bindings (i.e., no wild binders in the original case),