[Haskell-cafe] trees and pointers

Gregory Crosswhite gcross at phys.washington.edu
Wed Jul 14 17:43:50 EDT 2010


Or you can get the best of all worlds by combining all three!

    data User = User
        {    userNext :: IORef (MVar (TVar User)))
        ,    userPrev :: IORef (MVar (TVar User)))
        }


On 07/14/10 14:39, Andrew Coppin wrote:
> Serguey Zefirov wrote:
>> Use IORef. ;)
>>
>> PS
>> MVar is better, actually
>
> TVar is better still. ;-)
>
> _______________________________________________
> Haskell-Cafe mailing list
> Haskell-Cafe at haskell.org
> http://www.haskell.org/mailman/listinfo/haskell-cafe



More information about the Haskell-Cafe mailing list