st2: shared heap regions between local mutable state threads
This is a package candidate release! Here you can preview how this package release will appear once published to the main package index (which can be accomplished via the 'maintain' link below). Please note that once a package has been published to the main package index it cannot be undone! Please consult the package uploading documentation for more information.
This library implements the ST2 monad, a type using GDP (ghosts of departed proofs)
to define shared regions of memory between local mutable state threads. This allows
us to define a region of the heap in more minute contours, with each state thread
having explicit access to regions in memory. This is achieved using the function runST2
,
which in effects lets the user run a computation that makes use of two partially-overlapping
memory regions. Within that computation, the user can run sub-computations bound to one or
the other memory region. Furthermore, a sub-computation can move any variable that it owns
into the common overlap via share
.
An example is shown in the documentation, where one sub-computation creates two cells: one private, and the other shared. A second sub-computation has unconstrained access to the shared cell. Yet even though the private reference is also in scope during the second sub-computation, any attempts to access it there will fail to compile.
Properties
Versions | 0.1.0.0, 0.1.0.0, 0.1.0.1, 0.1.0.2, 0.1.1 |
---|---|
Change log | ChangeLog.md |
Dependencies | base (>=4.9 && <4.13), gdp, ghc-prim, primitive [details] |
License | BSD-3-Clause |
Copyright | copyright (c) 2018 chessai, copyright (c) 2018 Matt Noonan |
Author | chessai |
Maintainer | chessai1996@gmail.com |
Category | Data |
Home page | https://github.com/chessai/st2.git |
Uploaded | by chessai at 2018-07-23T19:53:47Z |
Modules
[Index] [Quick Jump]
- Control
- Monad
Downloads
- st2-0.1.0.0.tar.gz [browse] (Cabal source package)
- Package description (as included in the package)
Maintainer's Corner
Package maintainers
For package maintainers and hackage trustees