Is Read / Show for serialization or pretty printing?

Simon Marlow simonmarhaskell at
Mon Mar 5 06:21:34 EST 2007

Shae Matijs Erisson wrote:
> HAppS development during the ghc6.4 era required Read/Show for serialization,
> and binary serialization isn't yet popular for HAppS.
> Because of that, SURI.hs (Show URI) was added to HAppS to wrap Network.URI.
> I vaguely recall that Network.URI's Show instance was rewritten for GHC 6.6,
> but the current instance is more for pretty-printing than serialization.
> To make a long story short, Network.URI does not use derived Read and Show
> instances, and that causes problems when trying to get invertible
> serialization.
> The fix in our opinion is to switch to derived Read and Show instances for
> Network.URI.

Yes, Read and Show should be for serialisation.  We should really have a 
separate class for pretty printing.

Please submit a bug report against Network.URI.


More information about the Libraries mailing list