i think that thats only expressible with the style of parsing that agda mix fix does, and for a variety of reasons I'm somewhat skeptical of the same being viable for ghc for the forseeable future. 

On Mon, Feb 16, 2015 at 11:30 PM, Greg Weber <greg@gregweber.info> 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.

Adding such a thing to the language is probably not a good idea, but someone might possibly like such a notation for pedagogy. Of course, it will be pointed out that a Functor is not just a container. But Foldable is sometimes expressed as "anything that toList can be called on", so it should make sense there.

Greg Weber


_______________________________________________
Libraries mailing list
Libraries@haskell.org
http://mail.haskell.org/cgi-bin/mailman/listinfo/libraries