Improved specialisation of recursive groups
authorsimonpj@microsoft.com <unknown>
Wed, 3 Sep 2008 11:56:29 +0000 (11:56 +0000)
committersimonpj@microsoft.com <unknown>
Wed, 3 Sep 2008 11:56:29 +0000 (11:56 +0000)
commit78260da4deee97a866ba83f8d73a8284b371f405
tree44ed7c804f6df31da6be0912d1059359e89036d8
parentead14fa4cfd532568c1366a577e9579b0b69ac96
Improved specialisation of recursive groups

This patch significantly improves the way in which recursive groups
are specialised.  This turns out ot be very important when specilising
the bindings that (now) emerge from instance declarations.

Consider
    let rec { f x = ...g x'...
            ; g y = ...f y'.... }
    in f 'a'
Here we specialise 'f' at Char; but that is very likely to lead to
a specialisation of 'g' at Char.  We must do the latter, else the
whole point of specialisation is lost.  This was not happening before.

The whole thing is desribed in
    Note [Specialising a recursive group]

Simon
compiler/simplCore/SimplEnv.lhs
compiler/simplCore/SimplMonad.lhs
compiler/simplCore/Simplify.lhs
compiler/specialise/Rules.lhs
compiler/specialise/Specialise.lhs