Eliminate redundant seq's (Trac #8900)
authorSimon Peyton Jones <simonpj@microsoft.com>
Mon, 24 Mar 2014 14:22:50 +0000 (14:22 +0000)
committerSimon Peyton Jones <simonpj@microsoft.com>
Mon, 24 Mar 2014 14:22:50 +0000 (14:22 +0000)
commit0b6fa3e95078797f87302780a85607decab806fb
tree02915edf6145f01e292873627f45257f2eaadd74
parent73cab206e0f211b75cb6fd62ab9b6ca8ae0950f2
Eliminate redundant seq's (Trac #8900)

This patch makes the simplifier eliminate a redundant seq like
    case x of y -> ...y....
where y is used strictly.  GHC used to do this, but I made it less
aggressive in

   commit 28d9a03253e8fd613667526a170b684f2017d299 (Jan 2013)

However #8900 shows that doing so sometimes loses good
transformations; and the transformation is valid according to "A
semantics for imprecise exceptions".  So I'm restoring the old
behaviour.

See Note [Eliminating redundant seqs]
compiler/simplCore/Simplify.lhs