
21 Oct
2005
21 Oct
'05
9:22 a.m.
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? Cheers, Simon