Bulat Ziganshin wrote:
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)
?
Yes thanks - someone else pointed this out to me off-list as well.
I think that mental block must have been caused by watching too many
episodes of Star Trek yesterday!
Ok I give up, there's just no excuse... ;-)
Brian.
--
Logic empowers us and Love gives us purpose.
Yet still phantoms restless for eras long past,
congealed in the present in unthought forms,
strive mightily unseen to destroy us.
http://www.metamilk.com
_______________________________________________
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe