I can define operators directly or through their parenthesised name:

> let x .+ y = x + y

> let (.+) x y = (+) x y

> let (.+) x = (+) x

> let (.+) = (.+)

but I can't define them via sections:

> let (x .+) = (x +)

<interactive>:11:6: Parse error in pattern: x .+

> let (.+ y) = (+ y)

<interactive>:12:6: Parse error in pattern: .+ y

It seems natural to write, for example

instance Monad Maybe where

...

(>>= f) = \case

Nothing -> Nothing

Just a -> f a

Is there any particular reason this is not possible? Thanks,

Tom

_______________________________________________

Haskell-Cafe mailing list

To (un)subscribe, modify options or view archives go to:

http://mail.haskell.org/cgi-bin/mailman/listinfo/haskell-cafeOnly members subscribed via the mailman list are allowed to post.