[Haskell-cafe] What puts False before True?

PR Stanley prstanley at ntlworld.com
Thu May 31 05:03:05 EDT 2007


> > What is the basic philosophy for Bool being a member of Ord?
>you can do sth like
>
>Data.Set.fromList [minBound .. maxBound] :: Data.Set.Set Bool
>Sorry, not quite sure what you mean.
> > What justifies False < True?
>in most interpretations this equals:
>
>False == 0
>True == 1
>Indeed, it's the same in C but what justifies the decision in Haskell?



>and == (*)
>or == max
>not == (1 -)
>a `xor` b == (a + b) `mod` 2
>
>and not this:
>
>False == 1
>True == 0
>and == max
>or == (*)
>not == (1 -)
>a `xor` b == (a + b) `mod` 2
>
Thanks,
Paul 



More information about the Haskell-Cafe mailing list