From: Matthijs Kooijman Date: Wed, 31 Mar 2010 10:38:27 +0000 (+0200) Subject: Add LambdaBody to CoreContext. X-Git-Url: https://git.stderr.nl/gitweb?a=commitdiff_plain;h=bcaa7ec85a9025a95c431f550bb5ea0cf5af5375;p=matthijs%2Fmaster-project%2Fc%CE%BBash.git Add LambdaBody to CoreContext. --- diff --git "a/c\316\273ash/CLasH/Normalize/NormalizeTools.hs" "b/c\316\273ash/CLasH/Normalize/NormalizeTools.hs" index 09ae3f5..0402d93 100644 --- "a/c\316\273ash/CLasH/Normalize/NormalizeTools.hs" +++ "b/c\316\273ash/CLasH/Normalize/NormalizeTools.hs" @@ -77,7 +77,7 @@ subeverywhere trans c (Let (Rec binds) expr) = do return (b, e') subeverywhere trans c (Lam x expr) = do - expr' <- trans (Other:c) expr + expr' <- trans (LambdaBody:c) expr return $ Lam x expr' subeverywhere trans c (Case scrut b t alts) = do diff --git "a/c\316\273ash/CLasH/Normalize/NormalizeTypes.hs" "b/c\316\273ash/CLasH/Normalize/NormalizeTypes.hs" index e412e96..80d39ac 100644 --- "a/c\316\273ash/CLasH/Normalize/NormalizeTypes.hs" +++ "b/c\316\273ash/CLasH/Normalize/NormalizeTypes.hs" @@ -26,7 +26,8 @@ data CoreContext = AppFirst -- ^ The expression is the first -- expression. | LetBody -- ^ The expression is the body of a -- let expression + | LambdaBody -- ^ The expression is the body of a + -- lambda abstraction | Other -- ^ Another context - -- | Transforms a CoreExpr and keeps track if it has changed. type Transform = [CoreContext] -> CoreSyn.CoreExpr -> TransformMonad CoreSyn.CoreExpr