data-ref

Unify STRef and IORef in plain Haskell 98

http://wiki.haskell.org/Mutable_variable

Version on this page:0.0.1.1
LTS Haskell 17.10:0.0.2
Stackage Nightly 2021-05-09:0.0.2
Latest on Hackage:0.0.2

See all snapshots data-ref appears in

BSD-3-Clause licensed and maintained by Henning Thielemann
This version can be pinned in stack with:data-ref-0.0.1.1@sha256:527b8bbbe2ef9a8d7ae03d81d480c9db10e18c348295105594dd5b732d705b34,1308

Module documentation for 0.0.1.1

Depends on 3 packages(full list with versions):

This package provides a unique interface to both STRef and IORef. The advantage is that it is plain Haskell 98, the disadvantage is that we cannot use STRef and IORef as they are.

Our approach works with Haskell 98 single parameter type classes because we use an explicit dictionary, and we do not pass the references around but their accessors.

Similar packages: reference, ref-mtl, ref-fd, ref-tf.