
4 Feb
2007
4 Feb
'07
5:34 a.m.
G'day all.
Quoting Sergey Zaharchenko
Yes, I think another Show-like class will probably be a better solution...
This is the one that I use. Very simple. import Text.PrettyPrint.HughesPJ class Pretty a where -- Equivalent of showsPrec prettyP :: Int -> a -> Doc prettyP _ x = pretty x -- Equivalent of shows pretty :: a -> Doc pretty x = prettyP 0 x Cheers, Andrew Bromage