Skip to content

Using type-aliases in kind signatures requires DataKinds

import qualified Data.Kind

type U = Data.Kind.Type

type MyMaybe :: U -> U
data MyMaybe a = MyJust a | MyNothing

fails with GHC-9.2.1 with

[1 of 1] Compiling Main             ( ex.hs, interpreted )

ex.hs:5:17: error:
    • Type constructor ‘U’ cannot be used here
        (perhaps you intended to use DataKinds)
    • In a standalone kind signature for ‘MyMaybe’: U -> U
  |
5 | type MyMaybe :: U -> U
  |                 ^
Failed, no modules loaded.    

This doesn't make sense to me?

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