[GHC] #14514: Higher-Rank Kinds work in ADT but not GADT

GHC ghc-devs at haskell.org
Thu Nov 23 14:36:10 UTC 2017


#14514: Higher-Rank Kinds work in ADT but not GADT
-------------------------------------+-------------------------------------
        Reporter:  Iceland_jack      |                Owner:  (none)
            Type:  bug               |               Status:  closed
        Priority:  normal            |            Milestone:
       Component:  Compiler          |              Version:  8.2.1
      Resolution:  invalid           |             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 Iceland_jack):

 Great, could GHC detect that `ETag -> Type` is an instance (don't know the
 right terminology) of `WithAnyTag` and propose quantifying over it?

 {{{
     • Expected kind ‘WithAnyTag’, but ‘ext1’ has kind ‘ETag -> *’
     • In the first argument of ‘Exp’, namely ‘ext’
       In the type ‘Exp ext’
       In the definition of data constructor ‘Var’
    |
 17 |   Var :: ext VarTag -> Exp ext
    |                            ^^^
     • Try quantifying over `AnyTag`
    |
 17 |   Var :: forall (ext::AnyTag). ext VarTag -> Exp ext
    |
 }}}

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


More information about the ghc-tickets mailing list