[Haskell-cafe] if-then-else as rebindable syntax

Henning Thielemann lemming at henning-thielemann.de
Thu Jul 27 12:15:07 EDT 2006

On Thu, 27 Jul 2006, David House wrote:

> How about we drop the idea of an auxilary cond function, and instead
> just use a Boolean typeclass?
> class Boolean b where
> isTrue :: b -> Bool
> isFalse :: b -> Bool

I suspect that then the Int instance for Boolean will quickly arise,
  which flood us with (if 2+3 then "true" else "false"). This would take
us a lot of type safety.

More information about the Haskell-Cafe mailing list