Skip to content

Kind variables not allowed in type family instance declarations

I am trying to create a kind-indexed type family, but I cannot use kind variables in my kind annotations:

{-# LANGUAGE PolyKinds, TypeFamilies, DataKinds #-}

type family KindFam a
type instance KindFam (a :: *) = Int
type instance KindFam (a :: Bool) = Bool
type instance KindFam (a :: Maybe k) = Char -- doesn't work
Trac metadata
Trac field Value
Version 7.5
Type Bug
TypeOfFailure OtherFailure
Priority normal
Resolution Unresolved
Component Compiler (Type checker)
Test case
Differential revisions
BlockedBy
Related
Blocking
CC
Operating system
Architecture
To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information