Improve the treatment of 'seq' (Trac #2273)
authorsimonpj@microsoft.com <unknown>
Fri, 16 May 2008 08:51:49 +0000 (08:51 +0000)
committersimonpj@microsoft.com <unknown>
Fri, 16 May 2008 08:51:49 +0000 (08:51 +0000)
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.


No differences found