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

On 22 October 2005 06:21, Donald Bruce Stewart wrote:
The ones I can think of off the top of my head. Of course, these are weird for various reasons though:
> show $ toDyn (1::Int) -- Dynamic has no Read "<<Int>>"
> show $ typeOf (1::Int) -- TypeRep as no Read "Int"
That reminds me, the Show instance for Exception is similarly bogus. Cheers, Simon

On Mon, Oct 24, 2005 at 11:35:04AM +0100, Simon Marlow wrote:
On 22 October 2005 06:21, Donald Bruce Stewart wrote:
The ones I can think of off the top of my head. Of course, these are weird for various reasons though:
> show $ toDyn (1::Int) -- Dynamic has no Read "<<Int>>"
> show $ typeOf (1::Int) -- TypeRep as no Read "Int"
That reminds me, the Show instance for Exception is similarly bogus.
Cheers, Simon
And the one from Text.Show.Functions obviously, and Handle's and Socket's and ClockTime's and so on... I think we shouldn't be bothered about ``read . show === id'' not holding for types where it doesn't even typecheck... Groeten, Remi -- Nobody can be exactly like me. Even I have trouble doing it.
participants (2)
-
Remi Turk
-
Simon Marlow