[Haskell-cafe] Polykinded promoted types

Richard Eisenberg eir at cis.upenn.edu
Tue Dec 9 01:35:36 UTC 2014


While it's true that Maybe's kind is (* -> *), there still may be a better answer to your question, which asks, "Is there a way to get a polykinded promoted type?" Maybe isn't polykinded, but it's also not promoted. With

data Proxy a = P

we get (Proxy :: k -> *). But that's not promoted either. On the other hand we have ('Just :: k -> Maybe k), which is promoted and polykinded, but maybe not what you want.

Does this help?

Richard

On Dec 8, 2014, at 5:52 PM, Gautier DI FOLCO <gautier.difolco at gmail.com> wrote:

> 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 at haskell.org
> http://www.haskell.org/mailman/listinfo/haskell-cafe

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.haskell.org/pipermail/haskell-cafe/attachments/20141208/1b713277/attachment.html>


More information about the Haskell-Cafe mailing list