monad-var: Generic operations over variables

[ bsd3, library, unclassified ] [ Propose Tags ]

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. There are also some lenses to be described in an upcoming blog post.


[Skip to Readme]
Versions 0.1.0.0, 0.1.0.1, 0.1.1.0, 0.1.1.1, 0.1.2.0, 0.2.0.0, 0.2.1.0
Dependencies base (>=4.7 && <5), base-compat (>=0.9.0 && <1), stm (>=2.2 && <2.5), transformers (>=0.4 && <0.6) [details]
License BSD-3-Clause
Author effectfully
Maintainer effectfully@gmail.com
Home page https://github.com/effectfully/monad-var#readme
Source repo head: git clone https://github.com/effectfully/monad-var
Uploaded by effectfully at Sun Mar 25 13:21:57 UTC 2018
Distributions NixOS:0.2.1.0
Downloads 862 total (32 in the last 30 days)
Rating (no votes yet) [estimated by rule of succession]
Your Rating
  • λ
  • λ
  • λ
Status Docs available [build log]
Last success reported on 2018-03-25 [all 1 reports]
Hackage Matrix CI

Modules

[Index]

Downloads

Maintainer's Corner

For package maintainers and hackage trustees


Readme for monad-var-0.2.1.0

[back to package description]

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. There are also some lenses to be described in an upcoming blog post.