Skip to content

Commit 227307c

Browse files
committed
Updated README.md file
1 parent 4e07b8a commit 227307c

File tree

4 files changed

+52
-18
lines changed

4 files changed

+52
-18
lines changed

io-classes/README.md

Lines changed: 30 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# IO Monad Class Hierarchy: `io-classes`
1+
# IO Monad Class Hierarchy: `io-classes` package
22

33
This package provides a monad class hierarchy which is an interface for both
44
the [`io-sim`] and [`IO`] monads. It was developed with the following
@@ -21,7 +21,7 @@ We provide also non-standard extensions of this API in **sublibraries**:
2121
microseconds represented as `Int` as in `base`)
2222
- cancellable timeouts.
2323

24-
* [`io-classes:io-classes-mtl`](https://input-output-hk.github.io/io-sim/io-classes/io-classes-mtl/index.html):
24+
* [`io-classes:mtl`](https://input-output-hk.github.io/io-sim/io-classes/mtl/index.html):
2525
MTL instances.
2626

2727
[`io-classes:strict-stm`](https://input-output-hk.github.io/io-sim/io-classes/strict-stm/index.html)
@@ -63,6 +63,8 @@ in [`si-timers`] (ref [SI]), which provides a monoidal action of `DiffTime` on
6363
monotonic time as well as exposes 32-bit safe timer API (on 32-bit systems time
6464
in microseconds represented as an `Int` can only hold timeouts of ~35 minutes).
6565

66+
[`si-timers`] sublibrary provides cancellable timers API, see [`registerDelayCancellable`].
67+
6668
`Control.Monad.Class.MonadTimer.NonStandard.MonadTimeout` provides a low-level
6769
timeout abstraction. On systems that support a native timer manager, it's used
6870
to implement its API, which is very efficient even for low-latency timeouts.
@@ -77,17 +79,22 @@ delays & timers.
7779

7880
## Software Transactional Memory API
7981

80-
We provide two interfaces to `stm` API: lazy, included in `io-classes`; and
82+
We provide two interfaces to `stm` API: lazy, included in [`io-classes`][lazy-stm]; and
8183
strict one provided by [`io-classes:strict-stm`](https://input-output-hk.github.io/io-sim/io-classes/strict-stm/index.html).
8284

8385
## Threads API
8486

8587
We draw a line between `base` API and `async` API. The former is provided by
86-
[MonadFork](https://hackage.haskell.org/package/io-classes/docs/Control-Monad-Class-MonadFork.html#t:MonadFork)
87-
the latter by
88-
[MonadAsync](https://hackage.haskell.org/package/io-classes/docs/Control-Monad-Class-MonadAsync.html#t:MonadAsync).
89-
Both are shallow abstractions around APIs exposed by the `base` and `async`
90-
packages.
88+
[MonadFork] the latter by
89+
[MonadAsync] Both are shallow abstractions around APIs exposed by the `base`
90+
and `async` packages.
91+
92+
## `MVar` API
93+
94+
We also provide lazy and strict `MVar`s:
95+
96+
* [lazy `MVar`][MonadMVar] API
97+
* [strict `MVar`][strict-mvar] API is provided in the [io-classes:strict-mvar] sublibrary.
9198

9299

93100
## Some other APIs
@@ -96,6 +103,14 @@ packages.
96103
* [MonadST][MonadST]: provides a way to lift `ST`-computations.
97104
* [MonadSay][MonadSay]: dummy debugging interface
98105

106+
107+
## Monad Transformers
108+
109+
We provide support for monad transformers, see [io-classes:mtl] sublibrary.
110+
Although at this stage it might have its limitations and so there might be some
111+
rough edges. PRs are welcomed, [contributing].
112+
113+
99114
## Differences from `base`, `async`, or `exceptions` packages
100115

101116
### Major differences
@@ -142,22 +157,17 @@ only possible because we can control the execution environment of [`io-sim`].
142157
* `MonadInspectSTM` which allows inspecting values of `STM` mutable variables
143158
when they are committed. ([`io-sim`], not provided by `GHC`).
144159

145-
146-
## Monad Transformers
147-
148-
We provide support for monad transformers (although at this stage it might have
149-
its limitations and so there might be some rough edges. PRs are welcomed,
150-
[contributing]).
151-
152160
[SI]: https://www.wikiwand.com/en/International_System_of_Units
153161
[`DiffTime`]: https://hackage.haskell.org/package/time-1.10/docs/Data-Time-Clock.html#t:DiffTime
154162
[`IO`]: https://hackage.haskell.org/package/base-4.14.0.0/docs/GHC-IO.html#t:IO
155163
[`async`]: https://hackage.haskell.org/package/async
156164
[`base`]: https://hackage.haskell.org/package/base
157165
[`exceptions`]: https://hackage.haskell.org/package/exceptions
158166
[`io-sim`]: https://hackage.haskell.org/package/io-sim
167+
[io-classes:strict-mvar]: https://input-output-hk.github.io/io-sim/io-classes/strict-mvar/index.html
159168
[io-classes:mtl]: https://input-output-hk.github.io/io-sim/io-classes/mtl/index.html
160169
[`stm`]: https://hackage.haskell.org/package/stm
170+
[lazy-stm]: https://input-output-hk.github.io/io-sim/io-classes/Control-Concurrent-Class-MonadSTM.html
161171
[`threadDelay`]: https://hackage.haskell.org/package/io-classes/docs/Control-Monad-Class-MonadTimer.html#v:threadDelay
162172
[`time`]: https://hackage.haskell.org/package/time
163173
[contributing]: https://www.github.com/input-output-hk/io-sim/tree/master/CONTRIBUTING.md
@@ -167,6 +177,11 @@ its limitations and so there might be some rough edges. PRs are welcomed,
167177

168178
[MonadEventlog]: https://input-output-hk.github.io/io-sim/io-classes/Control-Monad-Class-MonadEventlog.html#t:MonadEventlog
169179
[Debug.Trace]: https://hackage.haskell.org/package/base/docs/Debug-Trace.html
180+
[MonadAsync]: https://input-output-hk.github.io/io-sim/io-classes/Control-Monad-Class-MonadAsync.html#t:MonadAsync
181+
[MonadFork]: https://input-output-hk.github.io/io-sim/io-classes/Control-Monad-Class-MonadFork.html#t:MonadFork
182+
[MonadMVar]: https://input-output-hk.github.io/io-sim/io-classes/Control-Concurrent-Class-MonadMVar.html#t:MonadMVar
183+
[`registerDelayCancellable`]: http://input-output-hk.github.io/io-sim/io-classes/si-timers/Control-Monad-Class-MonadTimer-SI.html#v:registerDelayCancellable
184+
[strict-mvar]: https://input-output-hk.github.io/io-sim/io-classes/strict-mvar/Control-Concurrent-Class-MonadMVar-Strict.html
170185
[MonadST]: https://input-output-hk.github.io/io-sim/io-classes/Control-Monad-Class-MonadST.html#t:MonadST
171186
[MonadSay]: https://input-output-hk.github.io/io-sim/io-classes/Control-Monad-Class-MonadSay.html#t:MonadSay
172187
[io-classes-haddocks]: https://input-output-hk.github.io/io-sim

io-classes/io-classes.cabal

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,21 @@ description:
1414

1515
packages.
1616

17+
= Sublibraries
18+
@io-classes@ provides non-standard extensions distributed in public
19+
sublibraries
20+
21+
* @io-classes:io-classes@ - the main library compatible with the above
22+
packages
23+
* @io-classes:strict-stm@ - strict @STM@ API
24+
* @io-classes:strict-mvar@ - strict @MVar@ API
25+
* @io-classes:si-timers@ - SI-unit based time / timers API, cancellable timers
26+
* @io-classes:mtl@ - MTL instances, some of which are experiemental
27+
28+
= Documentation
29+
Haddocks of all public sublibraries are published
30+
[here](https://input-output-hk.github.io/io-sim).
31+
1732
license: Apache-2.0
1833
license-files: LICENSE NOTICE
1934
copyright: 2019-2024 Input Output Global Inc (IOG)

io-sim/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# [IO Simulator Monad][`io-sim`]: `io-sim`
1+
# [IO Simulator Monad][`io-sim`]: `io-sim` package
22

33
A pure simulator monad built on top of the lazy `ST` monad which supports:
44

io-sim/io-sim.cabal

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,13 @@ name: io-sim
33
version: 1.6.0.0
44
synopsis: A pure simulator for monadic concurrency with STM.
55
description:
6-
A pure simulator monad with support of concurency (base & async style), stm,
6+
A pure simulator monad with support of concurrency (base & async style), stm,
77
synchronous and asynchronous exceptions, timeouts & delays, dynamic traces,
8-
partial order reduction and more.
8+
partial order reduction, and more.
9+
10+
= Documentation
11+
Documentation is published
12+
[here](https://input-output-hk.github.io/io-sim/io-sim).
913
license: Apache-2.0
1014
license-files: LICENSE NOTICE
1115
copyright: 2022-2024 Input Output Global Inc (IOG)

0 commit comments

Comments
 (0)