[GHC] #9291: Don't reconstruct sum types if the type subtly changes

GHC ghc-devs at haskell.org
Mon Jul 14 08:33:11 UTC 2014


#9291: Don't reconstruct sum types if the type subtly changes
----------------------------+----------------------------------------------
        Reporter:  schyler  |            Owner:
            Type:  feature  |           Status:  new
  request                   |        Milestone:
        Priority:  normal   |          Version:  7.8.2
       Component:           |         Keywords:
  Compiler                  |     Architecture:  Unknown/Multiple
      Resolution:           |       Difficulty:  Moderate (less than a day)
Operating System:           |       Blocked By:
  Unknown/Multiple          |  Related Tickets:
 Type of failure:           |
  None/Unknown              |
       Test Case:           |
        Blocking:           |
----------------------------+----------------------------------------------

Comment (by nomeata):

 Isn’t the first part of that transformation just a case of CSE, just as
 done on Core? If we do this, we’d probably also want

 {{{
   case e of y {
     ...
     C a b -> f (C a b)
     ...
   }

 =====>

   case e of y {
     ...
     C a b -> f y
     ...
   }
 }}}

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


More information about the ghc-tickets mailing list