We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
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)
type Functor f = { map : (a -> b) -> f a -> f b }
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.
Functor
Applicative
Monad
Foldable
You can do first-order things like Monoid though: type Monoid m = { unit : m, op : m -> m -> m }
type Monoid m = { unit : m, op : m -> m -> m }
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/Foldableand 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 }