projects
/
ghc-hetmet.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
68991fc
)
[project @ 2000-08-31 19:55:46 by simonpj]
author
simonpj
<unknown>
Thu, 31 Aug 2000 19:55:46 +0000
(19:55 +0000)
committer
simonpj
<unknown>
Thu, 31 Aug 2000 19:55:46 +0000
(19:55 +0000)
Put the max in a better place
ghc/compiler/coreSyn/CoreUtils.lhs
patch
|
blob
|
history
diff --git
a/ghc/compiler/coreSyn/CoreUtils.lhs
b/ghc/compiler/coreSyn/CoreUtils.lhs
index
0c01569
..
5e9736b
100644
(file)
--- a/
ghc/compiler/coreSyn/CoreUtils.lhs
+++ b/
ghc/compiler/coreSyn/CoreUtils.lhs
@@
-570,11
+570,11
@@
exprEtaExpandArity :: CoreExpr -> Int -- The number of args the thing can be ap
-- Hence "generous" arity
exprEtaExpandArity e
- = go e
+ = go e `max` 0 -- Never go -ve!
where
go (Var v) = idArity v
go (App f (Type _)) = go f
- go (App f a) | exprIsCheap a = (go f - 1) `max` 0 -- Never go -ve!
+ go (App f a) | exprIsCheap a = go f - 1
go (Lam x e) | isId x = go e + 1
| otherwise = go e
go (Note n e) | ok_note n = go e