Stop fruitless ANF-ing
authorsimonpj@microsoft.com <unknown>
Wed, 10 Feb 2010 09:47:33 +0000 (09:47 +0000)
committersimonpj@microsoft.com <unknown>
Wed, 10 Feb 2010 09:47:33 +0000 (09:47 +0000)
commit9a977e72a47a0e0c2a8bbf254f8b85609f0937f9
treecc1ed5a55276f27373aef0b35905d5c38aa43bba
parent90686adf9d3dc7a09a51853df051bc4ea472d840
Stop fruitless ANF-ing

The simplifier is taking more iterations than it should, because we
were fruitlessly ANF-ing a top-level declaration of form

   x = Ptr "foo"#

to get

   x = let v = "foo"# in Ptr v

and then inlining v again.  This patch makes Simplify.makeTrivial
top-level aware, so that it doesn't ANF if it's going to be undone.
compiler/simplCore/Simplify.lhs