[GHC] #12088: Type/data family instances in kind checking

GHC ghc-devs at haskell.org
Mon Apr 16 15:18:48 UTC 2018


#12088: Type/data family instances in kind checking
-------------------------------------+-------------------------------------
        Reporter:  alexvieth         |                Owner:  (none)
            Type:  bug               |               Status:  new
        Priority:  high              |            Milestone:  8.4.1
       Component:  Compiler (Type    |              Version:  8.1
  checker)                           |
      Resolution:                    |             Keywords:  TypeInType
Operating System:  Unknown/Multiple  |         Architecture:
 Type of failure:  GHC rejects       |  Unknown/Multiple
  valid program                      |            Test Case:
      Blocked By:                    |             Blocking:
 Related Tickets:  #11348, #12239,   |  Differential Rev(s):  Phab:D2272
  #12643, #13790                     |
       Wiki Page:                    |
  https://ghc.haskell.org/trac/ghc/wiki/GhcKinds/KindInference|
-------------------------------------+-------------------------------------

Comment (by goldfire):

 Iavor asked on the mailing lists about this example:

 {{{#!hs
 {-# Language TypeInType, TypeFamilies #-}

 module Help where

 import Data.Kind

 type family IxKind (m :: Type) :: Type
 type family Value (m :: Type) :: IxKind m -> Type

 data T (k :: Type) (f :: k -> Type)

 type instance IxKind (T k f) = k
 type instance Value (T k f) = f
 }}}

 Currently, you have to put a `$(return [])` between the two instances to
 get GHC to accept.

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


More information about the ghc-tickets mailing list