From: Matthijs Kooijman Date: Mon, 17 Aug 2009 09:54:01 +0000 (+0200) Subject: Make letflat work for nonrec lets in rec lets as well. X-Git-Url: https://git.stderr.nl/gitweb?a=commitdiff_plain;h=3a3430f7de80fe113b063ae46b3401f86830cf97;p=matthijs%2Fmaster-project%2Fc%CE%BBash.git Make letflat work for nonrec lets in rec lets as well. --- diff --git "a/c\316\273ash/CLasH/Normalize.hs" "b/c\316\273ash/CLasH/Normalize.hs" index 192ed55..5d2b3a6 100644 --- "a/c\316\273ash/CLasH/Normalize.hs" +++ "b/c\316\273ash/CLasH/Normalize.hs" @@ -220,6 +220,7 @@ letflat (Let (Rec binds) expr) = do -- into a list with just that binding flatbind :: (CoreBndr, CoreExpr) -> TransformMonad [(CoreBndr, CoreExpr)] flatbind (b, Let (Rec binds) expr) = change ((b, expr):binds) + flatbind (b, Let (NonRec b' expr') expr) = change [(b, expr), (b', expr')] flatbind (b, expr) = return [(b, expr)] -- Leave all other expressions unchanged letflat expr = return expr