[Haskell-cafe] Why is $ right associative instead of leftassociative?

Cale Gibbard cgibbard at gmail.com
Sat Feb 4 16:50:04 EST 2006

On 04/02/06, Brian Hulley <brianh at metamilk.com> wrote:
> Stefan Holdermans wrote:
> > Hash: SHA1
> >
> > Brian wrote:
> >
> >> I think the mystery surrounding :: and : might have been that
> >> originally people thought type annotations would hardly ever be
> >> needed whereas list cons is often needed, but now that it is
> >> regarded as good practice to put a type annotation before every top
> >> level value binding, and as the type system becomes more and more
> >> complex (eg with GADTs etc), type annotations are now presumably far
> >> more common than list cons so it would be good if Haskell Prime
> >> would swap these operators back to their de facto universal
> >> inter-language standard of list cons and type annotation
> >> respectively.
> >
> > I don't think Haskell Prime should be about changing the look and
> > feel of the language.
> Perhaps it is just a matter of aesthetics about :: and :, but I really feel
> these symbols have a de-facto meaning that should have been respected and
> that Haskell Prime would be a chance to correct this error. However no doubt
> I'm alone in this view so fair enough - it's just syntax after all and I can
> run my own programs through a pre-processor if I want them the other way
> round... :-)
> Regards, Brian.

In Haskell, they have a de-facto meaning which is opposite to the one
you're talking about :) Besides, lots of papers and various other
programming languages use Haskell's convention (which was taken from

 - Cale

More information about the Haskell-Cafe mailing list