[Haskell] Read Instances for Data.Map and Data.Set

Simon Marlow simonmar at microsoft.com
Fri Oct 21 05:22:07 EDT 2005

On 21 October 2005 08:43, Johannes Waldmann wrote:

> Georg made the point that if a type is an instance of Show,
> then it should also be an instance of Read, and  read . show == id

I rather think that this should be an explicit design requirement for
Read/Show instances in the libraries, along with the requirement that
the Show instance outputs valid Haskell syntax that can be included in a
program (assuming appropriate imports, and possibly an appropriate type
signature).  Show is not for pretty-printing, it is for serialising.

Are there any Show instances that violate these requirements in the
base/haskell98 packages currently?


More information about the Libraries mailing list