[project @ 2002-11-21 14:59:51 by simonpj]
authorsimonpj <unknown>
Thu, 21 Nov 2002 14:59:52 +0000 (14:59 +0000)
committersimonpj <unknown>
Thu, 21 Nov 2002 14:59:52 +0000 (14:59 +0000)
commitc9c016973e8b1cf996d0b87f24204b70622dc97f
tree4f1edfc0b8161e9379d32fd28453f71d256fa414
parent99cccd623b63570df4d33cbe335faaee323826df
[project @ 2002-11-21 14:59:51 by simonpj]
-------------------------------
Better notion of what a 'value' is
Slightly better eta reduction
-------------------------------

1.  At various places we watch out for "values"; the predicate exprIsValue
detects them. It was stupidly treating nullary constructors as non-values
which is exceptionally stupid.  This (performance) bug has been there
for ages.

There's an exactly similar bug in SimplUtils.interestingArg, which looks
for an interesting argument to trigger an inlining.

2.  The eta reduction in SimplUtils.tryEtaReduce would only eta reduce if
that left us with a variable.  That led to slightly tiresome thing like
:DMonad (/\a b -> foo @ s @ a @ b) ...
where this would be neater
:DMonad (foo @ s)
The fix is easy, and there's a little less code too.
ghc/compiler/coreSyn/CoreUtils.lhs
ghc/compiler/simplCore/SimplUtils.lhs