From: simonmar Date: Mon, 10 Dec 2001 13:54:35 +0000 (+0000) Subject: [project @ 2001-12-10 13:54:35 by simonmar] X-Git-Tag: Approximately_9120_patches~433 X-Git-Url: http://git.megacz.com/?a=commitdiff_plain;h=2e346fb329a2d7c8e0165761c608f9d29fdcf0ce;p=ghc-hetmet.git [project @ 2001-12-10 13:54:35 by simonmar] Don't force the IdInfo of a variable *occurrence* in exprSize, just the binding sites should be enough. --- diff --git a/ghc/compiler/coreSyn/CoreUtils.lhs b/ghc/compiler/coreSyn/CoreUtils.lhs index 4e61e83..6fafd53 100644 --- a/ghc/compiler/coreSyn/CoreUtils.lhs +++ b/ghc/compiler/coreSyn/CoreUtils.lhs @@ -1019,7 +1019,7 @@ coreBindsSize bs = foldr ((+) . bindSize) 0 bs exprSize :: CoreExpr -> Int -- A measure of the size of the expressions -- It also forces the expression pretty drastically as a side effect -exprSize (Var v) = varSize v +exprSize (Var v) = v `seq` 1 exprSize (Lit lit) = lit `seq` 1 exprSize (App f a) = exprSize f + exprSize a exprSize (Lam b e) = varSize b + exprSize e