Simplify SimplCont, plus some other small changes to the Simplifier
authorsimonpj@microsoft.com <unknown>
Tue, 22 Apr 2008 12:04:00 +0000 (12:04 +0000)
committersimonpj@microsoft.com <unknown>
Tue, 22 Apr 2008 12:04:00 +0000 (12:04 +0000)
commit53f99d8465ec50f7c37c65658fa346094bd37ded
tree858b26864242c85c8051744b4f1930fd2500f579
parent4e94e62917cc4cf5b4711b398f01e1b980cd4a5d
Simplify SimplCont, plus some other small changes to the Simplifier

The main change in this patch is this:

  * The Stop constructor of SimplCont no longer contains the OutType
    of the whole continuation.  This is a nice simplification in
    lots of places where we build a Stop continuation.  For example,
    rebuildCall no longer needs to maintain the type of the function.

  * Similarly StrictArg no longer needs an OutType

  * The consequential complication is that contResultType (not called
    much) needs to be given the type of the thing in the middle.  No
    big deal.

  * Lots of other small knock-on effects

Other changes in here

  * simplLazyBind does do the type-abstraction thing if there's
    a lambda inside.  See comments in simplLazyBind

  * simplLazyBind reduces simplifier iterations by keeping
    unfolding information for stuff for which type abstraction is
    done (see add_poly_bind)

All of this came up when implementing System IF, but seems worth applying
to the HEAD
compiler/coreSyn/CoreUtils.lhs
compiler/simplCore/SimplEnv.lhs
compiler/simplCore/SimplUtils.lhs
compiler/simplCore/Simplify.lhs