Fwd: [Haskell-cafe] Class

Bulat Ziganshin bulat.ziganshin at gmail.com
Fri Nov 3 05:24:59 EST 2006


Hello Slavomir,

Thursday, November 2, 2006, 5:47:37 PM, you wrote:

> class Show a => Visible a where
>     toString :: a -> String
>     toString = show
>     size :: a -> Int
>     size = length . show

it's not that you need. it's definition of subclass, say

class Set a => OrderedSet a


-- 
Best regards,
 Bulat                            mailto:Bulat.Ziganshin at gmail.com



More information about the Haskell-Cafe mailing list