On 17 jan 2009, at 22:22, Derek Elkins wrote:

On Thu, 2009-01-15 at 13:40 +0100, Apfelmus, Heinrich wrote:
Eugene Kirpichov wrote:
Well, your program is not equivalent to the C++ version, since it
doesn't bail on incorrect input.

Oops. That's because my assertion

  show . read = id

is wrong. We only have

  read . show  = id
  show . read <= id  (in the "less defined than" sense)

No, you only have
read . show = id which often doesn't hold in practice.
show . read </= id

You do not even have that; the read may remove surplus parentheses which will not be reinserted by the show.

 Doaitse




Assuming the first identity holds, you do of course have show . read .
show = show and this probably holds even in most cases where read . show
= id does not hold.


_______________________________________________
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe

_______________________________________________
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe

Reply via email to