From 064a4bf8c981c8fe135a648b08d31f940f5693c6 Mon Sep 17 00:00:00 2001 From: simonpj Date: Tue, 16 Dec 2003 14:27:31 +0000 Subject: [PATCH] [project @ 2003-12-16 14:27:31 by simonpj] comments only --- ghc/compiler/coreSyn/CoreUtils.lhs | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/ghc/compiler/coreSyn/CoreUtils.lhs b/ghc/compiler/coreSyn/CoreUtils.lhs index 67d1610..5111730 100644 --- a/ghc/compiler/coreSyn/CoreUtils.lhs +++ b/ghc/compiler/coreSyn/CoreUtils.lhs @@ -793,6 +793,11 @@ arityType (App f a) = case arityType f of -- Case/Let; keep arity if either the expression is cheap -- or it's a 1-shot lambda + -- The former is not really right for Haskell + -- f x = case x of { (a,b) -> \y. e } + -- ===> + -- f x y = case x of { (a,b) -> e } + -- The difference is observable using 'seq' arityType (Case scrut _ alts) = case foldr1 andArityType [arityType rhs | (_,_,rhs) <- alts] of xs@(AFun one_shot _) | one_shot -> xs xs | exprIsCheap scrut -> xs -- 1.7.10.4