packages feed

st2

shared heap regions between local mutable state threads

view on Hackage

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.
versionuploadeduploaderchanges
0.1.1 files2022-02-12 18:23 UTCchessai+53/−50 lines, 2 filesdep −ghc-primdep ~basedep ~gdpdep ~primitivePVP: major bump suggested
0.1.0.2 files2018-11-03 00:44 UTCchessai+42/−17 lines, 3 filesdep ~gdpdep ~primitive
0.1.0.1 files2018-11-02 19:34 UTCchessai+66/−6 lines, 3 files
0.1.0.0 files2018-07-23 19:53 UTCchessai+488/−0 lines, 5 filesdep +basedep +gdpdep +ghc-primsetup-changed

Dependencies of st2-0.1.1

base >=4.9 && <5 4.22.0.0 → 4.22.1.0
2026-12-01 12:38 UTC4.22.1.0 HSEC-2023-0007+388/−6 lines, 9 filesdep ~ghc-internalPVP: major bump suggested
2025-12-19 11:52 UTC4.22.0.0 HSEC-2023-0007+886/−215 lines, 28 filesdep ~ghc-internalPVP ok
2026-03-27 12:26 UTC4.21.2.0 HSEC-2023-0007+10/−3 lines, 4 filesdep ~ghc-internalPVP ok
2025-12-27 10:31 UTC4.21.1.0 HSEC-2023-0007+17/−5 lines, 4 filesdep ~ghc-internalPVP ok
2024-12-16 09:24 UTC4.21.0.0 HSEC-2023-0007+1170/−396 lines, 39 filesdep ~ghc-internalPVP ok

showing 5 of 61 versions

gdp >=0.0.0.1 && <0.1 0.0.0.2 → 0.0.3.0
2019-11-13 00:39 UTC0.0.3.0+446/−367 lines, 14 filesPVP: major bump suggested
2018-06-18 02:02 UTC0.0.0.2+3/−3 lines, 3 filesPVP: major bump suggested
2018-06-17 14:45 UTC0.0.0.1+1679/−0 lines, 15 filesdep +basedep +gdpdep +lawfulsetup-changed
primitive >=0.6.4 && <0.8 0.7.4.0 → 0.9.1.0 newer than bounds
2025-03-31 14:42 UTC0.9.1.0 newer than bounds+225/−135 lines, 12 filesdep +containersdep −ghc-primdep ~basePVP: major bump suggested
2023-10-05 15:07 UTC0.9.0.0 newer than bounds+995/−657 lines, 17 filesdep ~QuickCheckdep ~basedep ~tastyPVP ok
2023-02-20 16:20 UTC0.8.0.0 newer than bounds+328/−248 lines, 9 filesdep +data-array-bytedep ~basedep ~deepseqPVP ok
2022-05-20 18:46 UTC0.7.4.0+244/−146 lines, 10 filesdep +template-haskelldep −faildep −semigroupsdep ~basedep ~transformersPVP ok
2021-10-27 19:26 UTC0.7.3.0+951/−947 lines, 25 filesdep +tasty-benchdep ~basedep ~deepseqdep ~transformerssetup-changedPVP: major bump suggested

showing 5 of 30 versions

Reverse dependencies

1 packages depend on st2

acme-everything 2018.11.18 requires st2 >=0