[GHC] #14004: G

GHC ghc-devs at haskell.org
Sun Jul 23 09:07:16 UTC 2017


#14004: G
-------------------------------------+-------------------------------------
        Reporter:  zaoqi             |                Owner:  (none)
            Type:  feature request   |               Status:  new
        Priority:  normal            |            Milestone:
       Component:  Compiler          |              Version:  7.10.3
      Resolution:                    |             Keywords:
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 AntC):

 Replying to [comment:10 zaoqi]:

 Good. You've got it to compile. So we can close the ticket.

 I apologise: my comment:9 is wrong. I must have confused myself playing
 with it. Ben is right:

 > ... it's not even possible to know at runtime whether the bound `a` and
 `b` values are of the same type.

 In fact variables `a`, `b` bound by GADT `Dyn` are "rigid type variables".
 GHC always treats them as different types. They're existentially
 quantified. See
 [http://downloads.haskell.org/~ghc/8.0.2/docs/html/users_guide/glasgow_exts.html
 #generalised-algebraic-data-types-gadts The User Guide on GADTs]

 So `instance Eq Dyn` will always return False.

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


More information about the ghc-tickets mailing list