Skip to content

Can't use multiple names in a standalone kind signature

You can put multiple names in a single type signature, like so:

id1, id2 :: a -> a
id1 = id
id2 = id

However, the same does not hold for StandaloneKindSignatures. For example, the following program fails to parse:

{-# LANGUAGE StandaloneKindSignatures #-}
module Bug where

import Data.Kind

type T1, T2 :: Type -> Type
type T1 = Maybe
type T2 = Maybe
[1 of 1] Compiling Bug              ( Bug.hs, Bug.o )

Bug.hs:6:8: error: parse error on input ‘,’
  |
6 | type T1, T2 :: Type -> Type
  |        ^

This seems like it would be nice to have for consistency's sake.

Edited by Ryan Scott
To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information