Skip to content

Commit 4cef621

Browse files
committed
gha: haddocks
1 parent b7b8623 commit 4cef621

File tree

5 files changed

+33
-29
lines changed

5 files changed

+33
-29
lines changed

.github/workflows/github-page.yaml renamed to .github/workflows/github-page.yml

Lines changed: 11 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -30,15 +30,14 @@ jobs:
3030
url: ${{ steps.deployment.outputs.page_url }}
3131

3232
steps:
33-
- name: Checkout ouroboros-network repository
34-
uses: actions/checkout@v3
33+
- name: Install pandoc
34+
run: sudo apt install pandoc
3535

36-
# we need nix to later build the spec documents
37-
- name: Install Nix
38-
uses: cachix/install-nix-action@v20
36+
- name: Checkout io-sim repository
37+
uses: actions/checkout@v4
3938

4039
- name: Install Haskell
41-
uses: haskell/actions/setup@v2
40+
uses: haskell-actions/setup@v2
4241
id: setup-haskell
4342
with:
4443
ghc-version: ${{ matrix.ghc }}
@@ -58,17 +57,20 @@ jobs:
5857
- name: Build plan
5958
run: cabal build --dry-run --enable-tests all
6059

60+
- name: Run pandoc
61+
run: pandoc --from=markdown_github --to=haddock --output=README.haddock io-classes/README.md io-sim/README.md
62+
6163
- name: Build Haddock documentation 🔧
6264
run: |
63-
cabal haddock-project --hackage all
65+
cabal haddock-project --prologue=README.haddock --hackage all
6466
6567
- name: Upload artifacts
66-
uses: actions/upload-pages-artifact@v1
68+
uses: actions/upload-pages-artifact@v3
6769
with:
6870
path: ./haddocks
6971

7072
- name: Deploy 🚀
7173
id: deployment
72-
uses: actions/deploy-pages@v2
74+
uses: actions/deploy-pages@v4
7375

7476

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,3 +24,4 @@ cabal.project.local~
2424
.ghc.environment.*
2525
tags
2626
io-sim/tags
27+
README.haddock

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
[![Haskell CI](https://img.shields.io/github/actions/workflow/status/input-output-hk/io-sim/haskell.yml?branch=main&label=Build&style=for-the-badge)](https://github.com/input-output-hk/io-sim/actions/workflows/haskell.yml)
22
[![handbook](https://img.shields.io/badge/policy-Cardano%20Engineering%20Handbook-informational?style=for-the-badge)](https://input-output-hk.github.io/cardano-engineering-handbook)
3+
[![Haddocks](https://img.shields.io/badge/documentation-Haddocks-pink?style=for-the-badge)](https://input-output-hk.github.io/io-sim)
34

45
# [`io-sim`]
56

io-classes/README.md

Lines changed: 19 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# IO Monad Class Hierarchy
1+
# IO Monad Class Hierarchy: `io-classes`
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
@@ -12,19 +12,23 @@ constraints in mind:
1212

1313
We provide also non-standard extensions of this API in **sublibraries**:
1414

15-
* [`io-classes:strict-stm`]: strict `TVar`'s, and other mutable `STM` variables, with
15+
* [`io-classes:strict-stm`](https://input-output-hk.github.io/io-sim/io-classes/strict-stm/index.html) strict `TVar`'s, and other mutable `STM` variables, with
1616
support of the [`nothunks`] library;
17-
* [`io-classes:strict-mvar`]: strict `MVar`s
18-
* [`io-classes:si-timers`]: timers api:
17+
* [`io-classes:strict-mvar`](https://input-output-hk.github.io/io-sim/io-classes/strict-mvar/index.html): strict `MVar`s
18+
* [`io-classes:si-timers`](https://input-output-hk.github.io/io-sim/io-classes/si-timers/index.html): timers api:
1919
- 32-bit safe API using `DiffTime` measured in seconds (rather than time in
2020
microseconds represented as `Int` as in `base`)
2121
- cancellable timeouts.
22-
* [`io-classes-mtl`]: MTL instances.
22+
* [`io-classes:mtl`](https://input-output-hk.github.io/io-sim/io-classes/io-classes-mtl/index.html): MTL instances.
2323

24-
[`io-classes:strict-stm`] and [`nothunks`] were successfully used in a large
24+
[`io-classes:strict-stm`](https://input-output-hk.github.io/io-sim/io-classes/strict-stm/index.html) and [`nothunks`] were successfully used in a large
2525
code base to eliminate space leaks and keep that property over long development
2626
cycles.
2727

28+
## Documentation
29+
30+
Hackage doesn't yet support public sublibraries, thus Haddocks are published [here][io-classes-haddocks]
31+
2832
## Exception Class Hierarchy
2933

3034
This package provides an alternative class hierarchy giving access to
@@ -64,7 +68,7 @@ delays & timers.
6468
## Software Transactional Memory API
6569

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

6973
## Threads API
7074

@@ -78,9 +82,9 @@ packages.
7882

7983
## Some other APIs
8084

81-
* [MonadEventlog]: provides an API to the [Debug.Trace] event log interface.
82-
* [MonadST]: provides a way to lift `ST`-computations.
83-
* [MonadSay]: dummy debugging interface
85+
* [MonadEventlog][MonadEventlog]: provides an API to the [Debug.Trace] event log interface.
86+
* [MonadST][MonadST]: provides a way to lift `ST`-computations.
87+
* [MonadSay][MonadSay]: dummy debugging interface
8488

8589
## Differences from `base`, `async`, or `exceptions` packages
8690

@@ -142,7 +146,7 @@ its limitations and so there might be some rough edges. PRs are welcomed,
142146
[`base`]: https://hackage.haskell.org/package/base
143147
[`exceptions`]: https://hackage.haskell.org/package/exceptions
144148
[`io-sim`]: https://hackage.haskell.org/package/io-sim
145-
[`io-classes-mtl`]: https://hackage.haskell.org/package/io-classes-mtl
149+
[io-classes:mtl]: https://input-output-hk.github.io/io-sim/io-classes/mtl/index.html
146150
[`stm`]: https://hackage.haskell.org/package/stm
147151
[`threadDelay`]: https://hackage.haskell.org/package/io-classes/docs/Control-Monad-Class-MonadTimer.html#v:threadDelay
148152
[`time`]: https://hackage.haskell.org/package/time
@@ -151,12 +155,8 @@ its limitations and so there might be some rough edges. PRs are welcomed,
151155
[labelThread-base]: https://hackage.haskell.org/package/base-4.17.0.0/docs/GHC-Conc-Sync.html#v:labelThread
152156
[io-deadlock]: https://hackage.haskell.org/package/base-4.19.0.0/docs/Control-Exception.html#t:Deadlock
153157

154-
<!-- these links need to be updated once haskell/hackage-server#1218 is done --!>
155-
[`io-classes:si-timers`]: https://hackage.haskell.org/package/io-classes
156-
[`io-classes:strict-stm`]: https://hackage.haskell.org/package/io-classes
157-
[`io-classes:strict-mvar`]: https://hackage.haskell.org/package/io-classes
158-
159-
[MonadEventlog]: https://hackage.haskell.org/package/io-classes/docs/Control-Monad-Class-MonadEventlog.html#t:MonadEventlog
158+
[MonadEventlog]: https://input-output-hk.github.io/io-sim/io-classes/Control-Monad-Class-MonadEventlog.html#t:MonadEventlog
160159
[Debug.Trace]: https://hackage.haskell.org/package/base/docs/Debug-Trace.html
161-
[MonadST]: https://hackage.haskell.org/package/io-classes/docs/Control-Monad-Class-MonadST.html#t:MonadST
162-
[MonadSay]: https://hackage.haskell.org/package/io-classes/docs/Control-Monad-Class-MonadSay.html#t:MonadSay
160+
[MonadST]: https://input-output-hk.github.io/io-sim/io-classes/Control-Monad-Class-MonadST.html#t:MonadST
161+
[MonadSay]: https://input-output-hk.github.io/io-sim/io-classes/Control-Monad-Class-MonadSay.html#t:MonadSay
162+
[io-classes-haddocks]: https://input-output-hk.github.io/io-sim

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`]
1+
# [IO Simulator Monad][`io-sim`]: `io-sim`
22

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

0 commit comments

Comments
 (0)