[Haskell-cafe] Why are && and || right-associative?

Stefan Monnier monnier at iro.umontreal.ca
Fri Apr 12 23:32:34 UTC 2019


>> I don't know the historical answer, but I think it's because the true
>> fixity can't be expressed in Haskell.
> No, the historical answer is that with lazy evaluation the
> shortcutting happens in the expected order. We did think about
> that.

I don't understand how laziness enters the picture:

    (False && ⊥) && ⊥ ≡ False
    False && (⊥ && ⊥) ≡ False
    
in both cases we get the same result.


        Stefan



More information about the Haskell-Cafe mailing list