-
-
Notifications
You must be signed in to change notification settings - Fork 83
Closed
Labels
newBring something new into library (add function or type or interface)Bring something new into library (add function or type or interface)
Milestone
Description
Relude already offers lifted versions of atomicModifyIORef
and atomicModifyIORef'
functions. But these functions often used with ()
in the second place of tuple. See example in hintman
:
The new functions were proposed to be added to base
but they haven't landed:
- https://hackage.haskell.org/package/base-4.14.0.0/docs/Data-IORef.html#v:atomicModifyIORef
- Propose atomicModifyIORef_, atomicModifyIORef'_ ghc-proposals/ghc-proposals#230
I propose to implement them by ourselves. And if they ever going to be implemented in base
, we can easily reexport them.
The type signatures:
atomicModifyIORef_ :: MonadIO m => IORef a -> (a -> a) -> m ()
atomicModifyIORef'_ :: MonadIO m => IORef a -> (a -> a) -> m ()
vrom911
Metadata
Metadata
Assignees
Labels
newBring something new into library (add function or type or interface)Bring something new into library (add function or type or interface)