Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Higher-Kinded types Not Expressible #396

Copy link
Copy link

Description

@maxsnew
Issue body actions

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 }

Reactions are currently unavailable

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

    Morty Proxy This is a proxified and sanitized view of the page, visit original site.