[GHC] #12689: DataCon wrappers get in the way of rules

GHC ghc-devs at haskell.org
Thu Oct 13 18:03:20 UTC 2016


#12689: DataCon wrappers get in the way of rules
-------------------------------------+-------------------------------------
        Reporter:  nomeata           |                Owner:
            Type:  bug               |               Status:  new
        Priority:  normal            |            Milestone:
       Component:  Compiler          |              Version:  8.0.1
      Resolution:                    |             Keywords:
Operating System:  Unknown/Multiple  |         Architecture:
                                     |  Unknown/Multiple
 Type of failure:  None/Unknown      |            Test Case:
      Blocked By:                    |             Blocking:
 Related Tickets:                    |  Differential Rev(s):
       Wiki Page:                    |
-------------------------------------+-------------------------------------

Comment (by nomeata):

 I just found this comment in `SimplUtils`:
 {{{
 active_unfolding_minimal :: Id -> Bool
 -- Compuslory unfoldings only
 -- Ignore SimplGently, because we want to inline regardless;
 -- the Id has no top-level binding at all
 --
 -- NB: we used to have a second exception, for data con wrappers.
 -- On the grounds that we use gentle mode for rule LHSs, and
 -- they match better when data con wrappers are inlined.
 -- But that only really applies to the trivial wrappers (like (:)),
 -- and they are now constructed as Compulsory unfoldings (in MkId)
 -- so they'll happen anyway.
 active_unfolding_minimal id = isCompulsoryUnfolding (realIdUnfolding id)
 }}}
 Was there a time when `(:)` had a wrapper?

--
Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/12689#comment:6>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler


More information about the ghc-tickets mailing list