The documentation for the Show typeclass has this very example: http://hackage.haskell.org/packages/archive/base/latest/doc/html/Prelude.html#t:Show

The summary? you need to define either showPrec or show, the latter of which is simpler, it is just a -> String.

So:

instance Show (Tree Int Int) where
show (Tree (Node (k,v)) left right) = ...

On Jul 21, 2011, at 10:55 AM, Александр wrote:

Hello,  thank you for reply. I know that i can derive this. But i want to know how can i make it by hand.

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