increment :: IORef Int -> IO Int
increment ref = IORef.atomicModifyIORef' ref (\n -> (n+1, n))
increment :: IORef Int -> IO Int
increment ref = IORef.atomicModifyIORef' ref (\n -> (n+1, n))
increment ref = IORef.atomicModifyIORef' ref (\n -> (n+1, n))