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

Comments

Projects
None yet
4 participants
@maxsnew
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

This comment has been minimized.

Show comment
Hide comment
@evancz

evancz Dec 19, 2013

Member

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

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

This comment has been minimized.

Show comment
Hide comment
@rtfeldman

rtfeldman Jun 10, 2015

Member

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

Member

rtfeldman commented Jun 10, 2015

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

@Fresheyeball

This comment has been minimized.

Show comment
Hide comment
@Fresheyeball

Fresheyeball Jun 10, 2015

but but but... the types...

Fresheyeball commented Jun 10, 2015

but but but... the types...

@maxsnew maxsnew changed the title from Higher-Kinded types Not Expressible? to Higher-Kinded types Not Expressible Jun 11, 2015

@evancz

This comment has been minimized.

Show comment
Hide comment
@evancz

evancz Aug 6, 2015

Member

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.

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 Aug 6, 2015

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment