• simonpj@microsoft.com's avatar
    Stop fruitless ANF-ing · 9a977e72
    simonpj@microsoft.com authored
    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.
Simplify.lhs 91.6 KB