On Thu, Jun 21, 2007 at 04:37:20PM +0200, Tom Schrijvers wrote: > That wouldn't make a difference. If, from the pure Haskell point of view > we can't tell the difference between two expressions that denote the same > function, then operations in the IO monad should not be able to do so > either. Otherviews a whole lot of program transformations based on > rewriting of expressions would be invalid. How do you account for that?
In the same way we don't mind if "const getChar" can "tell a difference" between the value () (and itself). Also think of imprecise exceptions - really the pure code hitting the exception does all the usual stuff with stack walking, but semantically the pure expression evaluates to a set of exception, catch makes a nondeterministic choice of which one to handle, and it just happens that catch always picks the one that you run into first given the evaluation order that happend in this particular execution. I think it would be safe to treat serialize the same way. Brandon _______________________________________________ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe