
$ ghci -XDataKinds -XKindSignatures
Prelude> data K = K
Prelude> data Foo (a :: K) = Foo
Prelude> :kind Foo
Foo :: K -> *
Note that types with kinds other than * are uninhabited, so you can't write
a version of Maybe with that kind (because the Just constructor would
require a value that can't exist).
On Mon, Dec 8, 2014 at 2:52 PM, Gautier DI FOLCO
Hi all,
Is there a way to get a Polykinded promoted type. For example with *Maybe* I get: data *Maybe* a = Just a | Nothing Prelude> :k *Maybe* *Maybe* :: ** -> **
Is it possible to get a *k -> **? If so, how can I do that?
Thanks in advance for your help, Regards.
_______________________________________________ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe