[Haskell-cafe] Re: [Haskell] Top Level <-

Ashley Yakeley ashley at semantic.org
Sat Aug 30 08:16:56 EDT 2008

Ganesh Sittampalam wrote:
> How do the implementers of Data.Unique know that they musn't let them be 
> serialised/deserialised? What stops the same rule from applying to 
> Data.Random?

Unique values should be no more deserialisable than IORefs.

Is it the functionality of Data.Unique that you object to, or the fact 
that it's implemented with a global variable?

If the former, one could easily build Unique values on top of IORefs, 
since IORef is in Eq. Thus Data.Unique is no worse than IORefs (ignoring 
hashability, anyway).

If the latter, how do you recommend implementing Data.Unique? 
Implementing them on IORefs seems ugly. Or should they just be a 
primitive of the platform, like IORefs themselves?

Ashley Yakeley

More information about the Haskell-Cafe mailing list