[Haskell-cafe] if-then-else as rebindable syntax
matt at immute.net
Thu Jul 27 12:31:41 EDT 2006
[Henning Thielemann <lemming at henning-thielemann.de>]
> 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.
No doubt the String instance would be close behind...
Matt Hellige matt at immute.net
More information about the Haskell-Cafe