[Haskell-cafe] Re: Haskell serialisation,
was: To yi or not to yi...
Brandon Michael Moore
brandon at heave.ugcs.caltech.edu
Thu Jun 21 13:34:44 EDT 2007
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.
More information about the Haskell-Cafe