[Haskell-cafe] Numeric vs. relative precedences of infix operators

Henning Thielemann lemming at henning-thielemann.de
Wed Mar 2 04:08:08 EST 2005

On Wed, 2 Mar 2005, Benjamin Franksen wrote:

> There is a good argument for 'distfix' i.e. bracketing operators, IMO. You
> could define your own if_then_else:
> 	`if cond `then` truebranch `else` falsebranch end`

I would be more happy with

if :: Bool -> a -> a -> a
if True  x _ = x
if False _ y = y

than with parentheses redefinitions as () and [] in C++.

More information about the Haskell-Cafe mailing list