Hi all, The Haskell report defines the fixity of (\\) to be: infix 5 \\ I propose that it gets the following fixity: infixl 5 \\ This means that one can write: as \\ bs \\ cs \\ ds Which means: (((as \\ bs) \\ cs) \\ ds) I think that one less often means the following: as \\ (bs \\ (cs \\ ds)) /Koen. -- Koen Claessen http://www.cs.chalmers.se/~koen phone:+46-31-772 5424 mailto:koen@cs.chalmers.se ----------------------------------------------------- Chalmers University of Technology, Gothenburg, Sweden
On Wed, 17 Jan 2001, Koen Claessen wrote:
I propose that it gets the following fixity:
infixl 5 \\
Unless the it's common usage outside of Haskell, I oppose! Getting List> [1,2,3]\\[2]\\[3] ERROR: Ambiguous use of operator "(\\)" with "(\\)" at compile time does no harm, but getting [1] instead of [1,3] _at run time_ does do harm. Jón -- Jón Fairbairn Jon.Fairbairn@cl.cam.ac.uk 31 Chalmers Road jf@cl.cam.ac.uk Cambridge CB1 3SZ +44 1223 570179 (pm only, please)
I agree with Koen: \\ is list subtraction and we're all used to subtraction being left associative. John. Jon Fairbairn wrote:
On Wed, 17 Jan 2001, Koen Claessen wrote:
I propose that it gets the following fixity:
infixl 5 \\
Unless the it's common usage outside of Haskell, I oppose!
Getting
List> [1,2,3]\\[2]\\[3] ERROR: Ambiguous use of operator "(\\)" with "(\\)"
at compile time does no harm, but getting [1] instead of [1,3] _at run time_ does do harm. Jón -- Jón Fairbairn Jon.Fairbairn@cl.cam.ac.uk 31 Chalmers Road jf@cl.cam.ac.uk Cambridge CB1 3SZ +44 1223 570179 (pm only, please)
_______________________________________________ Haskell mailing list Haskell@haskell.org http://www.haskell.org/mailman/listinfo/haskell
participants (3)
-
John Launchbury -
Jon Fairbairn -
Koen Claessen