RE: Haskell 98: fixity of >>=

1998-12-16 Thread Simon Peyton-Jones
> whereas under 1.3 fixity it parses as: > > > main :: IO () > > main = f >> > >(dropOut cond1 $ > > (g >> > > (dropOut cond2 $ > > h) > > > > dropOut :: Bool -> IO () -> IO () > > dropOut gotError cont | gotError = return () > > | otherwi

Re: Haskell 98: fixity of >>=

1998-12-15 Thread Graeme E Moss
*** I was originally posting to ask a question, but I've solved the *** question through trying to ask it. :-) I've included the mail *** anyway in case anyone finds it useful. |The fixity only makes a difference when you consider an expression |like f >>= g >>= h, where, for example, f,g,h a

Re: Haskell 98: fixity of >>=

1998-12-15 Thread Patrik Jansson
Well, Mark was faster, the text below basically says the same thing. On Tue, 15 Dec 1998, Malcolm Wallace wrote: > Just a quickie: > I see that the fixity decl of the monad operation >> and >>= changed > from right associative in 1.3 to left associative in 1.4. This strikes > me as a bug in 1.4

Re: Haskell 98: fixity of >>=

1998-12-15 Thread Mark P Jones
| Right associativity allows: | f >>= \x-> | g >>= \y-> | h x | which with left associativity will be rejected because x is unbound | (in h x), or even worse: if x is bound at an outer scope, you might get | completely the wrong value (or if you're lucky a type error). No worries here

Haskell 98: fixity of >>=

1998-12-15 Thread Malcolm Wallace
Just a quickie: I see that the fixity decl of the monad operation >> and >>= changed from right associative in 1.3 to left associative in 1.4. This strikes me as a bug in 1.4 which ought to be reversed in 98. Right associativity allows: f >>= \x-> g >>= \y-> h x which with left asso