Interface for a mutable veriable
PVar that can hold values that have
Main features include:
- Perfomance. There is practically no overhead when compared to operating on pure values,
although there is a higher memory overhead, since
PVaris backed by a
- Atomic operations for
Intvalues. This includes a unique function that is not availiable in
ghc-primout of the box:
atomicModifyIntPVar :: PrimMonad m => PVar m Int -> (Int -> (Int, a)) -> m a
- Works in
PrimMonad, therfore usable with
IOand various transformer monads.
- Easy access to
isMutableByteArrayPinnedfunction that work on ghc-7.10 and ghc-8.0 as well as all the newer ones.
Changelog for pvar
- Addition of backwards compatible:
isMutableByteArrayPinned(that work on ghc-7.10 and ghc-8.0)
- Primitive versions
- Support for GHC 7.10 and GHC 8.0
alignmentfor easier compatibility with older primitive versions.
- Initial release