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

Ganesh Sittampalam ganesh at earth.li
Sat Aug 30 08:27:29 EDT 2008


On Sat, 30 Aug 2008, Ashley Yakeley wrote:

> 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.

This seems fine to me. It's based on something that already does work 
properly across a process scope, instead of some new language feature that 
is actually hard to implement across the process scope.

Ganesh


More information about the Haskell-Cafe mailing list