Overloadable list type notation

Henning Thielemann lemming at henning-thielemann.de
Tue Feb 17 08:38:58 UTC 2015



On Mon, 16 Feb 2015, Greg Weber wrote:

> I had an idea whose goal is to ease people into Foldable, Traversable, etc.
> There could be a notation that shows the generalization that is occurring.
> 
> map :: Functor [_] => (a -> b) -> [a] -> [b]
> 
> This means that the syntax for the list type is now syntax for the variable created by the Functor
> constraint.

Btw. there is already a prefix name for the list type constructor, namely 
'[]'. Thus I think your example would be:

> map :: Functor [] => (a -> b) -> [a] -> [b]


More information about the Libraries mailing list