patch applied (ghc-6.8/ghc): MERGED: Improve the treatment of 'seq'
(Trac #2273)
Ian Lynagh
igloo at earth.li
Fri May 23 07:44:22 EDT 2008
Wed May 21 14:20:31 PDT 2008 Ian Lynagh <igloo at earth.li>
* MERGED: Improve the treatment of 'seq' (Trac #2273)
Trac #2273 showed a case in which 'seq' didn't cure the space leak
it was supposed to. This patch does two things to help
a) It removes a now-redundant special case in Simplify, which
switched off the case-binder-swap in the early stages. This
isn't necessary any more because FloatOut has improved since
the Simplify code was written. And switching off the binder-swap
is harmful for seq.
However fix (a) is a bit fragile, so I did (b) too:
b) Desugar 'seq' specially. See Note [Desugaring seq (2)] in DsUtils
This isn't very robust either, since it's defeated by abstraction,
but that's not something GHC can fix; the programmer should use
a let! instead.
simonpj at microsoft.com**20080516085149
M ./compiler/basicTypes/MkId.lhs -6 +14
M ./compiler/deSugar/DsUtils.lhs -9 +44
M ./compiler/simplCore/Simplify.lhs -12 +15
View patch online:
http://darcs.haskell.org/ghc-6.8/ghc/_darcs/patches/20080521212031-3fd76-e9d9c167c83ec99b60bcf0f792ce9ff57bf4c81a.gz
More information about the Cvs-ghc
mailing list