Is there a standard way to print out values ββfor end-user consumption? Showclearly more convenient for debugging than what will work for this purpose, given the conventions surrounding its use and the limitation that read (show x) == x.
For example, there is at least no simple package such as
class (Show a) => PShow a where
pshow :: a -> String
pshow = show
pprint :: (PShow a) => a -> IO ()
pprint = putStrLn . pshow
where the instances do something like
instance PShow MyType where
pshow a = someUserFriendlyStringOf a
Please note that I am not asking for something that provides complex printing and formatting functions (I see several packages that do this) just for a simple abstraction, which is widely used, which allows pretty typing. Is there something like this?
orome