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

GHC ghc-devs at haskell.org
Thu Jan 5 15:55:36 UTC 2017


#9291: Don't reconstruct sum types if the type subtly changes
-------------------------------------+-------------------------------------
        Reporter:  schyler           |                Owner:  nomeata
            Type:  feature request   |               Status:  closed
        Priority:  normal            |            Milestone:
       Component:  Compiler          |              Version:  7.8.2
      Resolution:  fixed             |             Keywords:
Operating System:  Unknown/Multiple  |         Architecture:
 Type of failure:  Runtime           |  Unknown/Multiple
  performance bug                    |            Test Case:
      Blocked By:                    |             Blocking:
 Related Tickets:                    |  Differential Rev(s):  Phab:D2871
       Wiki Page:                    |
-------------------------------------+-------------------------------------

Comment (by heisenbug):

 Replying to [comment:47 nomeata]:
 > > Looking at the tests, I do not see Either x y <-> Maybe y coercions.
 Are these supposed to be done?
 >
 > Are you referring to treating a `Just x` directly `Right x`, i.e. using
 similarly looking constructors at a different type? That is not included
 here, and it is not clear whether we actually want it done. If you think
 we do, please open a new ticket for it.

 Yes, that is what I mean. They would be memory-layout compatible. I'll
 ponder a bit more, and if I still think it's a good idea, I'll follow up
 with a ticket. Thanks for doing this!

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


More information about the ghc-tickets mailing list