hoare

Simple tools for communicating sequential processes

LTS Haskell 24.67:0.1.1.0
Stackage Nightly 2026-11-19:0.2.0.0
Latest on Hackage:0.2.0.0

See all snapshots hoare appears in

Zlib licensed by Matt Kline
Maintained by [email protected]
This version can be pinned in stack with:hoare-0.2.0.0@sha256:c0844f602115c8bfb1e6c962133baa80e2cee396828be1fd13b6f2b97be55c72,2530
Depends on 5 packages(full list with versions):

Hoare was right—many concurrent programs can be simply expressed as a series of concurrent actors (threads) consuming and producing messages. Haskell provides uniquely great tools (green threads and STM) for doing so. This package provides:

  • Functions for using bounded STM types like TBQueue and TMVar as channels between threads.

  • A closeable TBCQueue and TCSlot for programs where the input ends.

  • A "split" API on top of the above, using newtypes to distinguish the producer side from the consumer side.

  • Some wrappers to gather metrics (items produced/consumed, wait times). This API is experimental and unstable.