Skip to content

Commit 097476e

Browse files
authored
Merge pull request #64 from input-output-hk/coot/haddocks
typed-protocols-stateful: haddocks
2 parents d127d3e + c594b9c commit 097476e

File tree

15 files changed

+79
-29
lines changed

15 files changed

+79
-29
lines changed

.github/workflows/haskell.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ jobs:
1111
strategy:
1212
fail-fast: false
1313
matrix:
14-
ghc: ["8.10", "9.2", "9.4", "9.6", "9.10"]
14+
ghc: ["8.10", "9.2", "9.4", "9.6", "9.8", "9.10"]
1515
os: [ubuntu-latest, macos-latest, windows-latest]
1616

1717
env:

typed-protocols-cborg/CHANGELOG.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,13 @@
11
# Revision history for typed-protocols-cborg
22

3+
## 0.3.0.0
4+
5+
* bumped version to agree with `typed-protocols-stateful-0.3.0.0`
6+
7+
## 0.2.0.0
8+
9+
* updated to use `typed-protocols-0.2.0.0`
10+
311
## 0.1.0.0 -- 2021-07-28
412

513
* Initial experiments and prototyping

typed-protocols-cborg/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,5 +2,5 @@ typed-protocols-cborg
22
=====================
33

44
[CBOR](https://hackage.haskell.org/package/cborg) codecs for
5-
[typed-protocols](https://input-output-hk.github.io/ouroboros-network/typed-protocols/Network-TypedProtocol.html)
5+
[typed-protocols](https://input-output-hk.github.io/typed-protocols)
66
package.

typed-protocols-cborg/typed-protocols-cborg.cabal

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,8 @@ author: Alexander Vieth, Duncan Coutts, Marcin Szamotulski
1212
maintainer: alex@well-typed.com, duncan@well-typed.com, marcin.szamotulski@iohk.io
1313
category: Control
1414
build-type: Simple
15-
tested-with: GHC == {8.10, 9.2, 9.4, 9.6}
16-
extra-source-files: CHANGELOG.md, README.md
15+
tested-with: GHC == {8.10, 9.2, 9.4, 9.6, 9.8, 9.10}
16+
extra-doc-files: CHANGELOG.md, README.md
1717

1818
library
1919
exposed-modules: Network.TypedProtocol.Codec.CBOR

typed-protocols-doc/typed-protocols-doc.cabal

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@ category: Network
1212
build-type: Simple
1313
extra-doc-files: CHANGELOG.md
1414
NOTICE
15-
-- extra-source-files:
1615

1716
common warnings
1817
ghc-options: -Wall

typed-protocols-examples/typed-protocols-examples.cabal

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,15 +7,15 @@ license: Apache-2.0
77
license-files:
88
LICENSE
99
NOTICE
10-
copyright: 2019-2023 Input Output Global Inc (IOG)
10+
copyright: 2019-2024 Input Output Global Inc (IOG)
1111
author: Alexander Vieth, Duncan Coutts, Marcin Szamotulski
1212
maintainer: alex@well-typed.com, duncan@well-typed.com, marcin.szamotulski@iohk.io
1313
category: Control
1414
build-type: Simple
15-
tested-with: GHC == {8.10, 9.2, 9.4, 9.6}
15+
tested-with: GHC == {8.10, 9.2, 9.4, 9.6, 9.8, 9.10}
1616

1717
-- These should probably be added at some point.
18-
-- extra-source-files: ChangeLog.md, README.md
18+
-- extra-doc-files: ChangeLog.md, README.md
1919

2020
library
2121
exposed-modules: Network.TypedProtocol.Channel
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
# Revision history of typed-protocols-stateful
2+
3+
## 0.3.0.0
4+
5+
* bumped version to agree with `typed-protocols-stateful-0.3.0.0`, in particular:
6+
when encoding the local state associated to the initial message state is
7+
passed to the codec.
8+
9+
## 0.2.0.0
10+
11+
* Initial version
12+

typed-protocols-stateful-cborg/ChangeLog.md

Lines changed: 0 additions & 6 deletions
This file was deleted.

typed-protocols-stateful-cborg/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,5 +2,5 @@ typed-protocols-stateful-cborg
22
==============================
33

44
[CBOR](https://hackage.haskell.org/package/cborg) codecs for
5-
[typed-protocols-stateful](https://input-output-hk.github.io/ouroboros-network/typed-protocols/Network-TypedProtocol-Stateful-Peer.html)
5+
[typed-protocols-stateful](https://input-output-hk.github.io/typed-protocols/typed-protocols-stateful)
66
package.

typed-protocols-stateful-cborg/typed-protocols-stateful-cborg.cabal

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,10 +11,11 @@ copyright: 2022-2024 Input Output Global Inc (IOG)
1111
author: Marcin Szamotulski
1212
maintainer: marcin.szamotulski@iohk.io
1313
category: Control
14+
tested-with: GHC == {8.10, 9.2, 9.4, 9.6, 9.8, 9.10}
1415
build-type: Simple
1516

1617
-- These should probably be added at some point.
17-
extra-source-files: ChangeLog.md, README.md
18+
extra-doc-files: CHANGELOG.md, README.md
1819

1920
library
2021
exposed-modules: Network.TypedProtocol.Stateful.Codec.CBOR

typed-protocols-stateful/CHANGELOG.md

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
# Revision history of typed-protocols-stateful
2+
3+
## 0.3.0.0
4+
5+
* when encoding a message the local state associated to the initial message
6+
state, rather than final state, is passed to the codec. For that reason:
7+
* `Yield` requires local state associated to both the initial and final protocol state
8+
* `Codec` and `Driver` have changed accordingly
9+
10+
This change eliminates the need to have add extra fields in messages which
11+
are not send over the wire, see the `Network.TypedProtocol.Stateful.ReqResp`
12+
example.
13+
* `AnyMessage` takes only the local state associated to the initial protocol state of the `Message`.
14+
* Removed `Show` instance of `AnyMessage`, provided instead `showAnyMessage`.
15+
* `AnyMessageWithAgency` pattern synonym is exported as a constructor of `AnyMessage`.
16+
* constraints of `prop_*` APIs where changed.
17+
18+
## 0.2.0.0
19+
20+
* Initial version

typed-protocols-stateful/src/Network/TypedProtocol/Stateful/Peer.hs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ import Network.TypedProtocol.Core as Core
4040
--
4141
-- * the protocol itself;
4242
-- * the client\/server role;
43-
-- *.the current protocol state;
43+
-- * the current protocol state;
4444
-- * the local state type;
4545
-- * the monad in which the peer operates; and
4646
-- * the type of any final result once the peer terminates.

typed-protocols-stateful/typed-protocols-stateful.cabal

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,9 +12,8 @@ author: Marcin Szamotulski
1212
maintainer: marcin.szamotulski@iohk.io
1313
category: Control
1414
build-type: Simple
15-
16-
-- These should probably be added at some point.
17-
-- extra-source-files: ChangeLog.md, README.md
15+
tested-with: GHC == {8.10, 9.2, 9.4, 9.6, 9.8, 9.10}
16+
extra-doc-files: CHANGELOG.md
1817

1918
library
2019
exposed-modules: Network.TypedProtocol.Stateful.Peer

typed-protocols/CHANGELOG.md

Lines changed: 23 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,28 @@
11
# Revision history for typed-protocols
22

3-
## [Unreleased]
4-
5-
- A major redesign of `typed-protocols`. `Protocol` class requires data family
6-
`Message` and new associated type familiy instance `StateAgency`. One also
7-
needs to define singletons and `Sing` & `SingI` instances from the
8-
[`singletons`][singletons-3.0.1] package.
3+
## 0.3.0.0
4+
5+
* `AnyMessageWithAgency` pattern synonym is exported as a constructor of `AnyMessage`.
6+
* Bumped version to agree with `typed-protocols-stateful`.
7+
8+
## 0.2.0.0
9+
10+
* A major redesign of `typed-protocols`.
11+
* `Protocol` class does not require to provide proof obligations for agency.
12+
Proofs are now provided by the framework for all protocols. Agency is now
13+
provided by an associated type family `StateAgency`, and evidence for it,
14+
in form of a singleton, by `StateToken` type family
15+
(similar to `Sing` from the `singletons` package).
16+
* `Peer` takes a different evidence type for agency,
17+
`Network.TypedProtocol.Peer.{Client,Server}` modules provide pattern synonyms
18+
which provide agency evidence and thus are easier to use.
19+
* One `Peer` is provided for both non- and pipelined protocol evolution.
20+
An extra parameter is added of kind `IsPipelined`. As a result
21+
`Outstanding` is now a type family rather than a type alias.
22+
* `ActiveAgency` type class is used to distinguish states in which one side
23+
has an agency (e.g. the protocol hasn't yet terminated), `nonActiveState` can
24+
be used in the same way as `Data.Void.absurd` - which is useful when writing
25+
codecs.
926

1027
## 0.1.1.1
1128
* unbuildable (with `base < 0` constraint in CHaP); We cannot support

typed-protocols/typed-protocols.cabal

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,13 +7,13 @@ license: Apache-2.0
77
license-files:
88
LICENSE
99
NOTICE
10-
copyright: 2019-2023 Input Output Global Inc (IOG)
10+
copyright: 2019-2024 Input Output Global Inc (IOG)
1111
author: Alexander Vieth, Duncan Coutts, Marcin Szamotulski
1212
maintainer: alex@well-typed.com, duncan@well-typed.com, marcin.szamotulski@iohk.io
1313
category: Control
1414
build-type: Simple
15-
tested-with: GHC == {8.10, 9.2, 9.4, 9.6}
16-
extra-source-files: CHANGELOG.md
15+
tested-with: GHC == {8.10, 9.2, 9.4, 9.6, 9.8, 9.10}
16+
extra-doc-files: CHANGELOG.md
1717

1818
library
1919
exposed-modules: Network.TypedProtocol

0 commit comments

Comments
 (0)