[Haskell-cafe] ANN: Monad.Reader Issue 19

Joey Adams joeyadams3.14159 at gmail.com
Mon Oct 31 18:30:08 CET 2011


On Wed, Oct 26, 2011 at 4:24 PM, Bas van Dijk <v.dijk.bas at gmail.com> wrote:
> I have one question regarding your use of atomicModifyIORef:
>
>  x <- atomicModifyIORef ref (\_ -> (tmstr, ()))
>  x `seq` return ()
>
> Can't you write that as just: writeIORef ref tmstr? If you're not
> using the previous value of the IORef there's no chance of
> inconsistency.



More information about the Haskell-Cafe mailing list