Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Higher-Kinded types Not Expressible #396

Closed
maxsnew opened this issue Dec 19, 2013 · 4 comments
Closed

Higher-Kinded types Not Expressible #396

maxsnew opened this issue Dec 19, 2013 · 4 comments
Labels

Comments

@maxsnew
Copy link
Contributor

maxsnew commented Dec 19, 2013

I don't know if this is a parser bug or if Elm just doesn't support this, but the following yield parse errors:

type Functor f = { map : (a -> b) -> f a -> f b }
and
data Ap f a = Ap (f a)

This means you can't define higher-kinded things like Functor/Applicative/Monad/Foldable and do dictionary-passing style for ad-hoc polymorphism.

You can do first-order things like Monoid though:
type Monoid m = { unit : m, op : m -> m -> m }

@evancz
Copy link
Member

evancz commented Dec 19, 2013

Yeah, @johnpmayer and I have talked about this. It's lame, but it's nontrivial to add and is not critical for most cases.

@rtfeldman
Copy link
Member

I feel like this can safely be closed, 18+ months later. 😉

@Fresheyeball
Copy link

but but but... the types...

@maxsnew maxsnew changed the title Higher-Kinded types Not Expressible? Higher-Kinded types Not Expressible Jun 11, 2015
@evancz
Copy link
Member

evancz commented Aug 6, 2015

This is a known feature request that I have in my rough roadmap. This issue won't be the major factor in any decision about when/if this gets added, so I am going to close in an effort to clear out the issues here.

Earlier on, it was okay to handle feature requests on this repo, but it's not working out anymore. So I want this repo to be more for bugs and such. We will do project and feature planning in a different way.

@evancz evancz closed this as completed Aug 6, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants