From 89a057b191f63702e3f73a8973329c8a0bbd9d10 Mon Sep 17 00:00:00 2001 From: Marcin Szamotulski Date: Wed, 11 Sep 2024 07:24:34 +0200 Subject: [PATCH 1/4] Revert "Allow to use io-classes-1.7" This reverts commit fd4020050cd8ec2e06e56bcc969052e726f2084f. --- cabal.project | 2 +- typed-protocols/typed-protocols.cabal | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/cabal.project b/cabal.project index 5c9b7552..0b0e5376 100644 --- a/cabal.project +++ b/cabal.project @@ -11,7 +11,7 @@ repository cardano-haskell-packages d4a35cd3121aa00d18544bb0ac01c3e1691d618f462c46129271bccf39f7e8ee index-state: - hackage.haskell.org 2024-08-27T18:06:30Z + hackage.haskell.org 2024-08-27T07:58:31Z , cardano-haskell-packages 2024-06-27T10:53:24Z packages: ./typed-protocols diff --git a/typed-protocols/typed-protocols.cabal b/typed-protocols/typed-protocols.cabal index a4788e89..69353ceb 100644 --- a/typed-protocols/typed-protocols.cabal +++ b/typed-protocols/typed-protocols.cabal @@ -32,7 +32,7 @@ library , TypeOperators , BangPatterns build-depends: base, - io-classes ^>= 1.7 + io-classes ^>= 1.6 hs-source-dirs: src default-language: Haskell2010 From 29935ea12f88e9cc38eaf23c2a71eb62532927a0 Mon Sep 17 00:00:00 2001 From: Marcin Szamotulski Date: Wed, 11 Sep 2024 07:24:42 +0200 Subject: [PATCH 2/4] Revert "Use io-classes-1.6" This reverts commit 6da129324b987c3713605461daf146e95f3bcea6. --- cabal.project | 2 +- .../src/Network/TypedProtocol/Codec/CBOR.hs | 6 +++--- typed-protocols-examples/typed-protocols-examples.cabal | 8 +++++--- typed-protocols/CHANGELOG.md | 4 ---- typed-protocols/typed-protocols.cabal | 4 ++-- 5 files changed, 11 insertions(+), 13 deletions(-) diff --git a/cabal.project b/cabal.project index 0b0e5376..e4454824 100644 --- a/cabal.project +++ b/cabal.project @@ -11,7 +11,7 @@ repository cardano-haskell-packages d4a35cd3121aa00d18544bb0ac01c3e1691d618f462c46129271bccf39f7e8ee index-state: - hackage.haskell.org 2024-08-27T07:58:31Z + hackage.haskell.org 2024-07-01T07:04:30Z , cardano-haskell-packages 2024-06-27T10:53:24Z packages: ./typed-protocols diff --git a/typed-protocols-cborg/src/Network/TypedProtocol/Codec/CBOR.hs b/typed-protocols-cborg/src/Network/TypedProtocol/Codec/CBOR.hs index bb2183a5..22d1721e 100644 --- a/typed-protocols-cborg/src/Network/TypedProtocol/Codec/CBOR.hs +++ b/typed-protocols-cborg/src/Network/TypedProtocol/Codec/CBOR.hs @@ -11,7 +11,7 @@ module Network.TypedProtocol.Codec.CBOR ) where import Control.Monad.Class.MonadST (MonadST (..)) -import Control.Monad.ST hiding (stToIO) +import Control.Monad.ST import qualified Codec.CBOR.Decoding as CBOR (Decoder) import qualified Codec.CBOR.Encoding as CBOR (Encoding) @@ -68,7 +68,7 @@ mkCodecCborStrictBS cborMsgEncode cborMsgDecode = :: (forall s. CBOR.Decoder s a) -> m (DecodeStep BS.ByteString DeserialiseFailure m a) convertCborDecoder cborDecode = - convertCborDecoderBS cborDecode stToIO + withLiftST (convertCborDecoderBS cborDecode) convertCborDecoderBS :: forall s m a. Functor m @@ -123,7 +123,7 @@ mkCodecCborLazyBS cborMsgEncode cborMsgDecode = :: (forall s. CBOR.Decoder s a) -> m (DecodeStep LBS.ByteString CBOR.DeserialiseFailure m a) convertCborDecoder cborDecode = - convertCborDecoderLBS cborDecode stToIO + withLiftST (convertCborDecoderLBS cborDecode) convertCborDecoderLBS :: forall s m a. Monad m diff --git a/typed-protocols-examples/typed-protocols-examples.cabal b/typed-protocols-examples/typed-protocols-examples.cabal index 3e8987a2..592a9817 100644 --- a/typed-protocols-examples/typed-protocols-examples.cabal +++ b/typed-protocols-examples/typed-protocols-examples.cabal @@ -1,6 +1,6 @@ cabal-version: 3.0 name: typed-protocols-examples -version: 0.2.0.3 +version: 0.2.0.2 synopsis: Examples and tests for the typed-protocols framework -- description: license: Apache-2.0 @@ -48,7 +48,8 @@ library cborg, serialise, contra-tracer, - io-classes:{io-classes,si-timers}, + io-classes, + si-timers, time, typed-protocols, typed-protocols-cborg @@ -76,8 +77,9 @@ test-suite test , typed-protocols , typed-protocols-cborg , typed-protocols-examples - , io-classes:{io-classes,si-timers} + , io-classes , io-sim + , si-timers , QuickCheck , tasty , tasty-quickcheck diff --git a/typed-protocols/CHANGELOG.md b/typed-protocols/CHANGELOG.md index 16b444cb..983be47f 100644 --- a/typed-protocols/CHANGELOG.md +++ b/typed-protocols/CHANGELOG.md @@ -1,9 +1,5 @@ # Revision history for typed-protocols-cborg -## 0.1.1.1 - -* Use `io-classes-1.6` - ## 0.1.0.7 -- 2023-10-20 * Improved performance of `prop_codecs_splitsM` and `prop_codecs_compatM`. diff --git a/typed-protocols/typed-protocols.cabal b/typed-protocols/typed-protocols.cabal index 69353ceb..1d92114d 100644 --- a/typed-protocols/typed-protocols.cabal +++ b/typed-protocols/typed-protocols.cabal @@ -1,6 +1,6 @@ cabal-version: 3.0 name: typed-protocols -version: 0.1.1.1 +version: 0.1.1.0 synopsis: A framework for strongly typed protocols -- description: license: Apache-2.0 @@ -32,7 +32,7 @@ library , TypeOperators , BangPatterns build-depends: base, - io-classes ^>= 1.6 + io-classes >= 1.0 && < 1.4 hs-source-dirs: src default-language: Haskell2010 From b3d4be2f9d542ed618e8820e777791b57bc61362 Mon Sep 17 00:00:00 2001 From: Marcin Szamotulski Date: Wed, 11 Sep 2024 07:26:05 +0200 Subject: [PATCH 3/4] Depend on `io-classes-1.5` --- cabal.project | 2 +- .../src/Network/TypedProtocol/Codec/CBOR.hs | 6 +++--- typed-protocols-cborg/typed-protocols-cborg.cabal | 2 +- typed-protocols/typed-protocols.cabal | 2 +- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/cabal.project b/cabal.project index e4454824..5c9b7552 100644 --- a/cabal.project +++ b/cabal.project @@ -11,7 +11,7 @@ repository cardano-haskell-packages d4a35cd3121aa00d18544bb0ac01c3e1691d618f462c46129271bccf39f7e8ee index-state: - hackage.haskell.org 2024-07-01T07:04:30Z + hackage.haskell.org 2024-08-27T18:06:30Z , cardano-haskell-packages 2024-06-27T10:53:24Z packages: ./typed-protocols diff --git a/typed-protocols-cborg/src/Network/TypedProtocol/Codec/CBOR.hs b/typed-protocols-cborg/src/Network/TypedProtocol/Codec/CBOR.hs index 22d1721e..bb2183a5 100644 --- a/typed-protocols-cborg/src/Network/TypedProtocol/Codec/CBOR.hs +++ b/typed-protocols-cborg/src/Network/TypedProtocol/Codec/CBOR.hs @@ -11,7 +11,7 @@ module Network.TypedProtocol.Codec.CBOR ) where import Control.Monad.Class.MonadST (MonadST (..)) -import Control.Monad.ST +import Control.Monad.ST hiding (stToIO) import qualified Codec.CBOR.Decoding as CBOR (Decoder) import qualified Codec.CBOR.Encoding as CBOR (Encoding) @@ -68,7 +68,7 @@ mkCodecCborStrictBS cborMsgEncode cborMsgDecode = :: (forall s. CBOR.Decoder s a) -> m (DecodeStep BS.ByteString DeserialiseFailure m a) convertCborDecoder cborDecode = - withLiftST (convertCborDecoderBS cborDecode) + convertCborDecoderBS cborDecode stToIO convertCborDecoderBS :: forall s m a. Functor m @@ -123,7 +123,7 @@ mkCodecCborLazyBS cborMsgEncode cborMsgDecode = :: (forall s. CBOR.Decoder s a) -> m (DecodeStep LBS.ByteString CBOR.DeserialiseFailure m a) convertCborDecoder cborDecode = - withLiftST (convertCborDecoderLBS cborDecode) + convertCborDecoderLBS cborDecode stToIO convertCborDecoderLBS :: forall s m a. Monad m diff --git a/typed-protocols-cborg/typed-protocols-cborg.cabal b/typed-protocols-cborg/typed-protocols-cborg.cabal index f801ffda..e770a0e0 100644 --- a/typed-protocols-cborg/typed-protocols-cborg.cabal +++ b/typed-protocols-cborg/typed-protocols-cborg.cabal @@ -22,7 +22,7 @@ library bytestring >=0.10 && <0.13, cborg >=0.2.1 && <0.3, - io-classes, + io-classes ^>=1.5, typed-protocols hs-source-dirs: src diff --git a/typed-protocols/typed-protocols.cabal b/typed-protocols/typed-protocols.cabal index 1d92114d..3c0d573c 100644 --- a/typed-protocols/typed-protocols.cabal +++ b/typed-protocols/typed-protocols.cabal @@ -32,7 +32,7 @@ library , TypeOperators , BangPatterns build-depends: base, - io-classes >= 1.0 && < 1.4 + io-classes >= 1.0 && < 1.6 hs-source-dirs: src default-language: Haskell2010 From 97f83ac72218a662a91df2a16cb15db8ca32bbde Mon Sep 17 00:00:00 2001 From: Marcin Szamotulski Date: Wed, 11 Sep 2024 07:27:11 +0200 Subject: [PATCH 4/4] typed-protocols: CHANGELOG file --- typed-protocols/CHANGELOG.md | 16 +++++----------- 1 file changed, 5 insertions(+), 11 deletions(-) diff --git a/typed-protocols/CHANGELOG.md b/typed-protocols/CHANGELOG.md index 983be47f..59c0ee18 100644 --- a/typed-protocols/CHANGELOG.md +++ b/typed-protocols/CHANGELOG.md @@ -1,12 +1,6 @@ -# Revision history for typed-protocols-cborg - -## 0.1.0.7 -- 2023-10-20 - -* Improved performance of `prop_codecs_splitsM` and `prop_codecs_compatM`. - -## 0.1.0.5 -- 2023-03-08 - -* Support `ghc-9.6.1`. -* Use `io-classes-1.1.0.0`. - +# Revision history for typed-protocols +## 0.1.1.1 +* unbuildable (with `base < 0` constraint in CHaP); We cannot support +`io-classes-1.{6,7}` until `Haskell.Nix` support for public sublibraries is + merged.