[Haskell-cafe] Re: Why is $ right associative instead ofleftassociative?

Stefan Monnier monnier at iro.umontreal.ca
Wed Feb 8 01:34:10 EST 2006

> The trouble with monad comprehensions was that it became far too easy to
> write ambiguous programs, even when you thought you were just working with
> lists.

One solution was already suggested: to make the comprehension syntax be pure
syntactic sugar whose semantics depends on the semantics of the identifiers
the syntactic sugar expands into.

So you could keep the current list-only comprehension as default, and allow
monad comprehension by providing a library (which the users need to import
so as to hide the Prelude's definition).


More information about the Haskell-Cafe mailing list