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 don't think this covers embedded languages. If everything lives in some monad it might be useful to rebind the if syntax at a type like
DSLMonad Bool -> DSLMonad a -> DSLMonad a -> DSLMonad a

Independent of how the if syntax works, an if function would still be handy. Maybe even both argument orders, a -> a -> Bool -> a for transforming booleans, and to follow the standard argument order on catamorphisms, and Bool -> a -> a where the conventional if order is good.

Brandon


_______________________________________________
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe

Reply via email to