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
-- 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