Remove InlinePlease and add inline function and RULE
authorsimonpj@microsoft.com <unknown>
Mon, 5 Jun 2006 11:49:00 +0000 (11:49 +0000)
committersimonpj@microsoft.com <unknown>
Mon, 5 Jun 2006 11:49:00 +0000 (11:49 +0000)
commitf2dcf256399e9a2de6343c625630b51f8abf4863
tree947b7f3b00bd7ba91332550311f9e22e9beaa7f3
parent8382f3ad690ab5c26bc3866f9b024bc7a2bc6308
Remove InlinePlease and add inline function and RULE

For a long time GHC has had some internal mechanism designed to support
a call-site inline directive, thus
inline f xs
makes f be inlined at the call site even if f is big.

However, the surface syntax seems to have gone, and in any case it
can be done more neatly using a RULE.

This commit:
  * Removes the InlineCall constructor for Note
    and InlinePlease for SimplCont

  * Adds a new known-key Id called 'inline', whose definition in
    GHC.Base is just the identity function

  * Adds a built-in RULE in PrelRules that rewrites (inline f) to
    the body of f, if possible

  * Adds documentation

NOTE: I have not tested this (aeroplane work).  Give it a try!
17 files changed:
compiler/coreSyn/CorePrep.lhs
compiler/coreSyn/CoreSyn.lhs
compiler/coreSyn/CoreUnfold.lhs
compiler/coreSyn/CoreUtils.lhs
compiler/coreSyn/MkExternalCore.lhs
compiler/coreSyn/PprCore.lhs
compiler/deSugar/DsCCall.lhs
compiler/iface/BinIface.hs
compiler/iface/IfaceSyn.lhs
compiler/iface/TcIface.lhs
compiler/prelude/PrelNames.lhs
compiler/prelude/PrelRules.lhs
compiler/simplCore/FloatIn.lhs
compiler/simplCore/SimplUtils.lhs
compiler/simplCore/Simplify.lhs
compiler/specialise/Rules.lhs
docs/users_guide/glasgow_exts.xml