https://github.com/effectfully/monad-var
Generic operations over variables
https://github.com/effectfully/monad-var
Last synced: 8 months ago
JSON representation
Generic operations over variables
- Host: GitHub
- URL: https://github.com/effectfully/monad-var
- Owner: effectfully
- Created: 2017-10-25T09:04:59.000Z (over 8 years ago)
- Default Branch: master
- Last Pushed: 2021-03-06T13:08:41.000Z (over 5 years ago)
- Last Synced: 2025-08-27T17:47:42.261Z (10 months ago)
- Language: Haskell
- Homepage:
- Size: 23.4 KB
- Stars: 3
- Watchers: 2
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# monad-var
The aim of this library is to provide a unified set of operations (`new`, `read`, `write`, `swap`, various strict `mutate*` functions and their derivatives (like mutate-and-return-the-old-value) and a certain interface for `MVar`-like things) over all common variable types: `IORef`, `STRef s`, `MVar`, `TVar`, `TMVar`.
When possible type classes are generalized to be over abstract containers rather than variables: e.g. it'd make sense to implement `MonadRead TChan` and `MonadMutate_ Vector` instances, but no such instances are provided right now.
For details see the [announce](https://github.com/effectfully-ou/sketches/tree/master/ann-monad-var).