Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add atomicModifyIORef_ and atomicModifyIORef'_ #294

Closed
chshersh opened this issue May 14, 2020 · 0 comments · Fixed by #297
Closed

Add atomicModifyIORef_ and atomicModifyIORef'_ #294

chshersh opened this issue May 14, 2020 · 0 comments · Fixed by #297
Assignees
Labels
new Bring something new into library (add function or type or interface)

Comments

@chshersh
Copy link
Contributor

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:

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 ()
@chshersh chshersh added the new Bring something new into library (add function or type or interface) label May 14, 2020
@chshersh chshersh added this to the v0.7.0.0: Refiner milestone May 14, 2020
@chshersh chshersh self-assigned this May 14, 2020
chshersh added a commit that referenced this issue May 14, 2020
chshersh added a commit that referenced this issue May 14, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
new Bring something new into library (add function or type or interface)
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant