diff --git a/.github/workflows/haskell.yml b/.github/workflows/haskell.yml index 7d43e42f..b156dded 100644 --- a/.github/workflows/haskell.yml +++ b/.github/workflows/haskell.yml @@ -11,7 +11,7 @@ jobs: strategy: fail-fast: false matrix: - ghc: ["8.10", "9.2", "9.4", "9.6", "9.10"] + ghc: ["8.10", "9.2", "9.4", "9.6", "9.8", "9.10"] os: [ubuntu-latest, macos-latest, windows-latest] env: diff --git a/typed-protocols-cborg/CHANGELOG.md b/typed-protocols-cborg/CHANGELOG.md index adaf4516..2cfd50eb 100644 --- a/typed-protocols-cborg/CHANGELOG.md +++ b/typed-protocols-cborg/CHANGELOG.md @@ -1,5 +1,13 @@ # Revision history for typed-protocols-cborg +## 0.3.0.0 + +* bumped version to agree with `typed-protocols-stateful-0.3.0.0` + +## 0.2.0.0 + +* updated to use `typed-protocols-0.2.0.0` + ## 0.1.0.0 -- 2021-07-28 * Initial experiments and prototyping diff --git a/typed-protocols-cborg/README.md b/typed-protocols-cborg/README.md index 84cb121c..0b3deea0 100644 --- a/typed-protocols-cborg/README.md +++ b/typed-protocols-cborg/README.md @@ -2,5 +2,5 @@ typed-protocols-cborg ===================== [CBOR](https://hackage.haskell.org/package/cborg) codecs for -[typed-protocols](https://input-output-hk.github.io/ouroboros-network/typed-protocols/Network-TypedProtocol.html) +[typed-protocols](https://input-output-hk.github.io/typed-protocols) package. diff --git a/typed-protocols-cborg/typed-protocols-cborg.cabal b/typed-protocols-cborg/typed-protocols-cborg.cabal index b77d82c4..710826e9 100644 --- a/typed-protocols-cborg/typed-protocols-cborg.cabal +++ b/typed-protocols-cborg/typed-protocols-cborg.cabal @@ -12,8 +12,8 @@ author: Alexander Vieth, Duncan Coutts, Marcin Szamotulski maintainer: alex@well-typed.com, duncan@well-typed.com, marcin.szamotulski@iohk.io category: Control build-type: Simple -tested-with: GHC == {8.10, 9.2, 9.4, 9.6} -extra-source-files: CHANGELOG.md, README.md +tested-with: GHC == {8.10, 9.2, 9.4, 9.6, 9.8, 9.10} +extra-doc-files: CHANGELOG.md, README.md library exposed-modules: Network.TypedProtocol.Codec.CBOR diff --git a/typed-protocols-doc/typed-protocols-doc.cabal b/typed-protocols-doc/typed-protocols-doc.cabal index bdc55ddd..a8117a08 100644 --- a/typed-protocols-doc/typed-protocols-doc.cabal +++ b/typed-protocols-doc/typed-protocols-doc.cabal @@ -12,7 +12,6 @@ category: Network build-type: Simple extra-doc-files: CHANGELOG.md NOTICE --- extra-source-files: common warnings ghc-options: -Wall diff --git a/typed-protocols-examples/typed-protocols-examples.cabal b/typed-protocols-examples/typed-protocols-examples.cabal index 12cb12b1..6db9449f 100644 --- a/typed-protocols-examples/typed-protocols-examples.cabal +++ b/typed-protocols-examples/typed-protocols-examples.cabal @@ -7,15 +7,15 @@ license: Apache-2.0 license-files: LICENSE NOTICE -copyright: 2019-2023 Input Output Global Inc (IOG) +copyright: 2019-2024 Input Output Global Inc (IOG) author: Alexander Vieth, Duncan Coutts, Marcin Szamotulski maintainer: alex@well-typed.com, duncan@well-typed.com, marcin.szamotulski@iohk.io category: Control build-type: Simple -tested-with: GHC == {8.10, 9.2, 9.4, 9.6} +tested-with: GHC == {8.10, 9.2, 9.4, 9.6, 9.8, 9.10} -- These should probably be added at some point. --- extra-source-files: ChangeLog.md, README.md +-- extra-doc-files: ChangeLog.md, README.md library exposed-modules: Network.TypedProtocol.Channel diff --git a/typed-protocols-stateful-cborg/CHANGELOG.md b/typed-protocols-stateful-cborg/CHANGELOG.md new file mode 100644 index 00000000..4ce3038d --- /dev/null +++ b/typed-protocols-stateful-cborg/CHANGELOG.md @@ -0,0 +1,12 @@ +# Revision history of typed-protocols-stateful + +## 0.3.0.0 + +* bumped version to agree with `typed-protocols-stateful-0.3.0.0`, in particular: + when encoding the local state associated to the initial message state is + passed to the codec. + +## 0.2.0.0 + +* Initial version + diff --git a/typed-protocols-stateful-cborg/ChangeLog.md b/typed-protocols-stateful-cborg/ChangeLog.md deleted file mode 100644 index adaf4516..00000000 --- a/typed-protocols-stateful-cborg/ChangeLog.md +++ /dev/null @@ -1,6 +0,0 @@ -# Revision history for typed-protocols-cborg - -## 0.1.0.0 -- 2021-07-28 - -* Initial experiments and prototyping - diff --git a/typed-protocols-stateful-cborg/README.md b/typed-protocols-stateful-cborg/README.md index 16b89de2..cb4ebb84 100644 --- a/typed-protocols-stateful-cborg/README.md +++ b/typed-protocols-stateful-cborg/README.md @@ -2,5 +2,5 @@ typed-protocols-stateful-cborg ============================== [CBOR](https://hackage.haskell.org/package/cborg) codecs for -[typed-protocols-stateful](https://input-output-hk.github.io/ouroboros-network/typed-protocols/Network-TypedProtocol-Stateful-Peer.html) +[typed-protocols-stateful](https://input-output-hk.github.io/typed-protocols/typed-protocols-stateful) package. diff --git a/typed-protocols-stateful-cborg/typed-protocols-stateful-cborg.cabal b/typed-protocols-stateful-cborg/typed-protocols-stateful-cborg.cabal index c2582b05..9e6baedd 100644 --- a/typed-protocols-stateful-cborg/typed-protocols-stateful-cborg.cabal +++ b/typed-protocols-stateful-cborg/typed-protocols-stateful-cborg.cabal @@ -11,10 +11,11 @@ copyright: 2022-2024 Input Output Global Inc (IOG) author: Marcin Szamotulski maintainer: marcin.szamotulski@iohk.io category: Control +tested-with: GHC == {8.10, 9.2, 9.4, 9.6, 9.8, 9.10} build-type: Simple -- These should probably be added at some point. -extra-source-files: ChangeLog.md, README.md +extra-doc-files: CHANGELOG.md, README.md library exposed-modules: Network.TypedProtocol.Stateful.Codec.CBOR diff --git a/typed-protocols-stateful/CHANGELOG.md b/typed-protocols-stateful/CHANGELOG.md new file mode 100644 index 00000000..68e4c840 --- /dev/null +++ b/typed-protocols-stateful/CHANGELOG.md @@ -0,0 +1,20 @@ +# Revision history of typed-protocols-stateful + +## 0.3.0.0 + +* when encoding a message the local state associated to the initial message + state, rather than final state, is passed to the codec. For that reason: + * `Yield` requires local state associated to both the initial and final protocol state + * `Codec` and `Driver` have changed accordingly + + This change eliminates the need to have add extra fields in messages which + are not send over the wire, see the `Network.TypedProtocol.Stateful.ReqResp` + example. +* `AnyMessage` takes only the local state associated to the initial protocol state of the `Message`. +* Removed `Show` instance of `AnyMessage`, provided instead `showAnyMessage`. +* `AnyMessageWithAgency` pattern synonym is exported as a constructor of `AnyMessage`. +* constraints of `prop_*` APIs where changed. + +## 0.2.0.0 + +* Initial version diff --git a/typed-protocols-stateful/src/Network/TypedProtocol/Stateful/Peer.hs b/typed-protocols-stateful/src/Network/TypedProtocol/Stateful/Peer.hs index a84ef2a1..275ef953 100644 --- a/typed-protocols-stateful/src/Network/TypedProtocol/Stateful/Peer.hs +++ b/typed-protocols-stateful/src/Network/TypedProtocol/Stateful/Peer.hs @@ -40,7 +40,7 @@ import Network.TypedProtocol.Core as Core -- -- * the protocol itself; -- * the client\/server role; --- *.the current protocol state; +-- * the current protocol state; -- * the local state type; -- * the monad in which the peer operates; and -- * the type of any final result once the peer terminates. diff --git a/typed-protocols-stateful/typed-protocols-stateful.cabal b/typed-protocols-stateful/typed-protocols-stateful.cabal index e2d43127..9c2e4fbe 100644 --- a/typed-protocols-stateful/typed-protocols-stateful.cabal +++ b/typed-protocols-stateful/typed-protocols-stateful.cabal @@ -12,9 +12,8 @@ author: Marcin Szamotulski maintainer: marcin.szamotulski@iohk.io category: Control build-type: Simple - --- These should probably be added at some point. --- extra-source-files: ChangeLog.md, README.md +tested-with: GHC == {8.10, 9.2, 9.4, 9.6, 9.8, 9.10} +extra-doc-files: CHANGELOG.md library exposed-modules: Network.TypedProtocol.Stateful.Peer diff --git a/typed-protocols/CHANGELOG.md b/typed-protocols/CHANGELOG.md index 8ad6716b..2fa7a363 100644 --- a/typed-protocols/CHANGELOG.md +++ b/typed-protocols/CHANGELOG.md @@ -1,11 +1,28 @@ # Revision history for typed-protocols -## [Unreleased] - -- A major redesign of `typed-protocols`. `Protocol` class requires data family - `Message` and new associated type familiy instance `StateAgency`. One also - needs to define singletons and `Sing` & `SingI` instances from the - [`singletons`][singletons-3.0.1] package. +## 0.3.0.0 + +* `AnyMessageWithAgency` pattern synonym is exported as a constructor of `AnyMessage`. +* Bumped version to agree with `typed-protocols-stateful`. + +## 0.2.0.0 + +* A major redesign of `typed-protocols`. + * `Protocol` class does not require to provide proof obligations for agency. + Proofs are now provided by the framework for all protocols. Agency is now + provided by an associated type family `StateAgency`, and evidence for it, + in form of a singleton, by `StateToken` type family + (similar to `Sing` from the `singletons` package). + * `Peer` takes a different evidence type for agency, + `Network.TypedProtocol.Peer.{Client,Server}` modules provide pattern synonyms + which provide agency evidence and thus are easier to use. + * One `Peer` is provided for both non- and pipelined protocol evolution. + An extra parameter is added of kind `IsPipelined`. As a result + `Outstanding` is now a type family rather than a type alias. + * `ActiveAgency` type class is used to distinguish states in which one side + has an agency (e.g. the protocol hasn't yet terminated), `nonActiveState` can + be used in the same way as `Data.Void.absurd` - which is useful when writing + codecs. ## 0.1.1.1 * unbuildable (with `base < 0` constraint in CHaP); We cannot support diff --git a/typed-protocols/typed-protocols.cabal b/typed-protocols/typed-protocols.cabal index 06417102..2e6fdcbc 100644 --- a/typed-protocols/typed-protocols.cabal +++ b/typed-protocols/typed-protocols.cabal @@ -7,13 +7,13 @@ license: Apache-2.0 license-files: LICENSE NOTICE -copyright: 2019-2023 Input Output Global Inc (IOG) +copyright: 2019-2024 Input Output Global Inc (IOG) author: Alexander Vieth, Duncan Coutts, Marcin Szamotulski maintainer: alex@well-typed.com, duncan@well-typed.com, marcin.szamotulski@iohk.io category: Control build-type: Simple -tested-with: GHC == {8.10, 9.2, 9.4, 9.6} -extra-source-files: CHANGELOG.md +tested-with: GHC == {8.10, 9.2, 9.4, 9.6, 9.8, 9.10} +extra-doc-files: CHANGELOG.md library exposed-modules: Network.TypedProtocol