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 }