Make worker/wrapper work on INLINEABLE things
authorSimon Peyton Jones <simonpj@microsoft.com>
Fri, 9 May 2014 10:15:33 +0000 (11:15 +0100)
committerSimon Peyton Jones <simonpj@microsoft.com>
Thu, 28 Aug 2014 10:14:08 +0000 (11:14 +0100)
commit9cf5906b692c31b7ec67856b0859cb0e33770651
tree3e8dd54d2e37356dc700e4bd46735dcc443ba702
parent8f09937426a40b9c638d63a2d726c3b755f88f82
Make worker/wrapper work on INLINEABLE things

This fixes a long-standing bug: Trac #6056.  The trouble was that
INLINEABLE "used up" the unfolding for the Id, so it couldn't be
worker/wrapper'd by the strictness analyser.

This patch allows the w/w to go ahead, and makes the *worker* INLINEABLE
instead, so it can later be specialised.

However, that doesn't completely solve the problem, because the dictionary
argument (which the specialiser treats specially) may be strict and
hence unpacked by w/w, so now the worker won't be specilialised after all.

Solution: never unpack dictionary arguments, which is done by the isClassTyCon
          test in WwLib.deepSplitProductType_maybe
compiler/coreSyn/CoreUnfold.lhs
compiler/stranal/WorkWrap.lhs
compiler/stranal/WwLib.lhs