[GHC] #9701: GADTs not specialized properly

GHC ghc-devs at haskell.org
Sun Oct 19 13:45:32 UTC 2014


#9701: GADTs not specialized properly
-------------------------------------+-------------------------------------
              Reporter:  dfeuer      |            Owner:
                  Type:  bug         |           Status:  new
              Priority:  normal      |        Milestone:
             Component:  Compiler    |          Version:  7.9
            Resolution:              |         Keywords:
      Operating System:              |     Architecture:  Unknown/Multiple
  Unknown/Multiple                   |       Difficulty:  Unknown
       Type of failure:  Runtime     |       Blocked By:
  performance bug                    |  Related Tickets:
             Test Case:              |
              Blocking:              |
Differential Revisions:              |
-------------------------------------+-------------------------------------

Comment (by goldfire):

 Replying to [comment:6 dfeuer]:
 > Thinking over the matter some more, I believe that incoherent instances
 already interact about as badly as they can with GADTs. Specifically,
 consider what will happen when GADT values coming from two different
 modules and carrying incoherent instances come together—if I'm not
 mistaken, there's no way to predict which dictionary will be chosen for
 any given operation combining them.

 And you don't even need `-XIncoherentInstances` to cause this problem --
 orphan instances are enough. Yes, you're right in that you can unpack two
 different instances from GADTs, and it's a tossup as to which one gets
 used. See #8338.

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


More information about the ghc-tickets mailing list