Inline data constructor wrappers in phase 2 only
authorSimon Peyton Jones <simonpj@microsoft.com>
Tue, 28 Feb 2017 19:04:40 +0000 (14:04 -0500)
committerDavid Feuer <David.Feuer@gmail.com>
Tue, 28 Feb 2017 19:04:41 +0000 (14:04 -0500)
commitfc6c222b90e68fed74a6bee6f087f47bf31f21c6
treefac9f3e5ea6a68b15e7e68699f1534ba4430dd1a
parent1990bb0df51250519b555ec271c693d289dd9802
Inline data constructor wrappers in phase 2 only

This patch prepares for my upcoming early-inlining patch. It arranges
that data constructor wrappers are not inlined until Phase 2 (the
first of the "normal" phases.)  That gives rules a chance to fire
in the InitialPhase (aka "gentle").

This has been a bit of a problem for a while, so it's nice to have
a fix.  It should make no difference immediately, becuase currently
nothing is inlined in the InitialPhase anyway.

Reviewers: austin, bgamari

Subscribers: thomie

Differential Revision: https://phabricator.haskell.org/D3193
compiler/basicTypes/MkId.hs
testsuite/tests/deSugar/should_compile/T2431.stderr
testsuite/tests/simplCore/should_compile/T7360.stderr