[Haskell-cafe] Eq Type Class: Overloading (==)

Bulat Ziganshin bulatz at HotPOP.com
Sat Sep 17 04:43:37 EDT 2005

Hello Jason,

Saturday, September 17, 2005, 10:14:14 AM, you wrote:

JD> class?  I also wish that "if" were a function, but that's probably
JD> just the lisper in me speaking.  Something like:

>if :: Bool b =>> b -> a -> a-> a

no problem!

iif :: Bool -> a -> a -> a

iif a b c  =  if a then b else c

anyway, Haskell use lazy evaluation ;)
really, i developed a lot of control structures for I/O monad

about making Bool a class - it is the same issue as making
head/map/... belonging to some Collection class. we need to change
standard Prelude or add to Haskell "supertyping" mechanism, proposed
by John Meacham, as i remember

Best regards,
 Bulat                            mailto:bulatz at HotPOP.com

More information about the Haskell-Cafe mailing list