[GHC] #14955: Musings on manual type class desugaring

GHC ghc-devs at haskell.org
Thu Mar 22 14:34:40 UTC 2018


#14955: Musings on manual type class desugaring
-------------------------------------+-------------------------------------
        Reporter:  mpickering        |                Owner:  (none)
            Type:  bug               |               Status:  new
        Priority:  normal            |            Milestone:
       Component:  Compiler          |              Version:  8.2.2
      Resolution:                    |             Keywords:  SpecConstr
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 Simon Peyton Jones <simonpj@…>):

 In [changeset:"034c32f6b8abd15eb9affca972844d3c6842af69/ghc" 034c32f/ghc]:
 {{{
 #!CommitTicketReference repository="ghc"
 revision="034c32f6b8abd15eb9affca972844d3c6842af69"
 Improve shortOutIndirections slightly

 I found (when investigating Trac #14955) a binding looking like

    Rec { exported_id = ....big...lcl_id...
        ; lcl_id = exported_id }

 but bizarrely 'lcl_id' was chosen as the loop breaker, and never
 inlined.  It turned out to be an unintended consequence of the
 shortOutIndirections code in SimplCore.  Easily fixed.
 }}}

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


More information about the ghc-tickets mailing list