[GHC] #14684: combineIdenticalAlts is only partially implemented

GHC ghc-devs at haskell.org
Mon Apr 2 08:56:56 UTC 2018


#14684: combineIdenticalAlts is only partially implemented
-------------------------------------+-------------------------------------
        Reporter:  mpickering        |                Owner:  sjakobi
            Type:  bug               |               Status:  new
        Priority:  normal            |            Milestone:  8.6.1
       Component:  Compiler          |              Version:  8.2.2
      Resolution:                    |             Keywords:  newcomer
Operating System:  Unknown/Multiple  |         Architecture:
                                     |  Unknown/Multiple
 Type of failure:  None/Unknown      |            Test Case:
      Blocked By:                    |             Blocking:
 Related Tickets:                    |  Differential Rev(s):  Phab:D4542
       Wiki Page:                    |
-------------------------------------+-------------------------------------

Comment (by simonpj):

 > Here, combineIdenticalAlts (which in my understanding runs first) would
 combine the A and B alts, defeating CSE.combineAlts which could combine C,
 D and E.

 But that would introduce a nasty phase-ordering problem.  Instead, maybe
 `CSE.combineAlts` should transform
 {{{
 case x of
   DEFAULT -> 1
   C -> 2
   D -> 2
   E -> 2
 }}}
 (which the user might have written) into
 {{{
 case x of
   DEFAULT -> 2
   A -> 1
   B -> 1
 }}}

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


More information about the ghc-tickets mailing list