[Haskell-cafe] Polykinded promoted types
Gautier DI FOLCO
gautier.difolco at gmail.com
Mon Dec 8 23:15:46 UTC 2014
2014-12-09 0:04 GMT+01:00 Taylor Hedberg <t at tmh.cc>:
> $ 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).
That was quick (and that is that I feared).
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Haskell-Cafe