serokell / universum

:milky_way: Prelude written in @Serokell
MIT License
176 stars 28 forks source link

[#234] Add concurrent primitives working with State #236

Closed Martoon-00 closed 2 years ago

Martoon-00 commented 4 years ago

Problem: existing modifyTVar' is not pretty convenient. You need to e.g. remember the order of arguments, and if several transformations are required, composing them neatly may be difficult.

Solution: provide methods working with State, not a lambda. This way one can write down modifications in do-block which is convenient.

Description

Related issues(s)

Fixed #234 by adding the respective methods.

✓ Checklist for your Pull Request

Ideally a PR has all of the checkmarks set.

If something in this list is irrelevant to your PR, you should still set this checkmark indicating that you are sure it is dealt with (be that by irrelevance).

Related changes (conditional)

Stylistic guide (mandatory)

gromakovsky commented 2 years ago

xrefcheck fails because universum is no longer in Nightly. Good to know, I'll check it.

Started working on it here: https://github.com/serokell/universum/pull/252 But it will probably take a while and involve a breaking change, so feel free to ignore that link for now and merge this PR. If you do it soon, let's set version to 1.7.3 and release it?

Martoon-00 commented 2 years ago

Thanks for looking into this!

xrefcheck fails because universum is no longer in Nightly. Good to know

Hmm, that was indeed an interesting way to check that we are not dropped from LTS.

If you do it soon, let's set version to 1.7.3 and release it?

Yep. Should I bump the version in this PR?

gromakovsky commented 2 years ago

Yep. Should I bump the version in this PR?

Yes, I propose to do it here and release the new version. I can also make you a maintainer on Hackage and you'll be able to upload it yourself. Actually I'll just go ahead and do it even if you don't want :peka:

Martoon-00 commented 2 years ago

Uploaded )

Looks like it.