[Haskell-cafe] Global fixity (our status quo) vs. local fixity

Adam Bergmark adam at bergmark.nl
Mon Oct 19 19:50:46 UTC 2015

Indeed, this is fortunately not a new idea and there are already


On Mon, Oct 19, 2015 at 9:39 PM, Jeffrey Brown <jeffbrown.the at gmail.com>

> In Haskell, fixity is global. There are ten levels. You can't stick
> something between two levels, and you can't subvert the order of the
> levels. If you want something that binds before >>= but after the logical
> operators && and ||, you're out of luck -- unless you're willing to define
> synonyms for && and || that bind faster. (Tidal, a music DSL written in
> Haskell (it's on Hackage), exemplifies that problem with its |+| operator.)
> Conceptually, by contrast, fixity is local. The arithmetic operators (* +
> - / and **), for instance, have a certain fixity defined relative to each
> other, and that order does not, I believe, in the mind of most users extend
> beyond arithmetic.
> Does anybody else think it would be nice if a library's author had only to
> decide its operators' precedence relative to each other, and could let
> users decide for themselves how fast its operators should bind relative to
> operators from another library?
> --
> Jeffrey Benjamin Brown
> _______________________________________________
> Haskell-Cafe mailing list
> Haskell-Cafe at haskell.org
> http://mail.haskell.org/cgi-bin/mailman/listinfo/haskell-cafe
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.haskell.org/pipermail/haskell-cafe/attachments/20151019/fe72c7f2/attachment.html>

More information about the Haskell-Cafe mailing list