
4 Aug
2006
4 Aug
'06
4:29 p.m.
Hello Brian, Friday, August 4, 2006, 8:50:25 PM, you wrote:
class Bar a b where bar :: a -> b
(*) But there's one exception: you can't use typeclasses to resolve overloadings between values and functions because non-function values don't have a type of the form A -> B:
cool :: Int cool :: Char -> String
class Cool -- Ooops! fundamental problem encountered ;-)
class Cool a where cool :: a instance Cool Int instance Cool (Char -> String) ? -- Best regards, Bulat mailto:Bulat.Ziganshin@gmail.com