GHC.Event.Unique vs Data.Unique

Johan Tibell johan.tibell at gmail.com
Sat Aug 2 18:11:58 UTC 2014


Despite having the same name, these two are quite different from what
I remember. The GHC.Event one (which me/Bryan added) is just a wrapped
Int, while the Data one is really more of a mutable state thing.

On Sat, Aug 2, 2014 at 8:40 AM, Michael Schröder <mc.schroeder at gmail.com> wrote:
> Is there a reason GHC.Event.Unique exists, since we also have Data.Unique?
> Or is this just a historical artifact? It looks like they used to have the
> same implementation, but have now diverged, with Data.Unique being the more
> recent one.
>
> GHC.Event.Unique still uses STM internally, and is as far as I can see the
> only part of the base library to do so. Which wouldn't really matter, except
> that now basic IO stuff like threadDelay and even putStr (sometimes,
> especially in ghci) cannot be used inside unsafeIOToSTM. Which is somewhat
> annoying…
>
> _______________________________________________
> ghc-devs mailing list
> ghc-devs at haskell.org
> http://www.haskell.org/mailman/listinfo/ghc-devs
>


More information about the ghc-devs mailing list