Skip to content

Removed not needed SRP #73

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 7 commits into from
Jun 17, 2025
Merged
Show file tree
Hide file tree
Changes from 6 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 1 addition & 9 deletions cabal.project
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
index-state: 2025-05-05T00:00:00Z
index-state: 2025-05-21T15:48:46Z

packages: ./typed-protocols
./typed-protocols-doc
Expand All @@ -13,11 +13,3 @@ if impl(ghc >= 9.12)
if os(windows)
package text
flags: -simdutf

source-repository-package
type: git
location: https://github.com/input-output-hk/io-sim
tag: aef112549bf85d51a03919008b6091af8933e9e2
--sha256: sha256-yfhBeAYwWktqBAkvXUVdrgBzNvTwAqMKglcjwflMtM4=
subdir: io-classes
io-sim
3 changes: 1 addition & 2 deletions typed-protocols/test/Network/TypedProtocol/ReqResp/Tests.hs
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@ import Control.Monad.Class.MonadAsync
import Control.Monad.Class.MonadST
import Control.Monad.Class.MonadSTM
import Control.Monad.Class.MonadThrow
import Control.Monad.Class.MonadTimer.SI
import Control.Monad.IOSim
import Control.Monad.ST (runST)
import Control.Tracer (nullTracer)
Expand Down Expand Up @@ -193,7 +192,7 @@ prop_channel_ST f xs =


prop_channelPipelined :: ( MonadLabelledSTM m, MonadAsync m, MonadCatch m
, MonadDelay m, MonadST m)
, MonadST m)
=> (Int -> Int -> (Int, Int)) -> [Int]
-> m Bool
prop_channelPipelined f xs = do
Expand Down
243 changes: 101 additions & 142 deletions typed-protocols/typed-protocols.cabal
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ name: typed-protocols
version: 1.0.0.0
synopsis: A framework for strongly typed protocols
description: A robust session type framework which supports protocol pipelining.
Haddocks are published [here](https://input-output-hk.github.io/typed-protocols/)
license: Apache-2.0
license-files:
LICENSE
Expand All @@ -16,25 +17,12 @@ tested-with: GHC == {9.6, 9.8, 9.10, 9.12}
extra-doc-files: CHANGELOG.md
README.md

library
exposed-modules: Network.TypedProtocol
, Network.TypedProtocol.Core
, Network.TypedProtocol.Peer
, Network.TypedProtocol.Peer.Client
, Network.TypedProtocol.Peer.Server
, Network.TypedProtocol.Codec
, Network.TypedProtocol.Driver
, Network.TypedProtocol.Proofs
other-modules: Network.TypedProtocol.Lemmas
build-depends: base >=4.12 && <4.22,
io-classes:io-classes ^>= 1.8,
singletons ^>= 3.0

hs-source-dirs: src
default-language: GHC2021
default-extensions: DataKinds
GADTs
LambdaCase
-- Minimal GHC setup, additional extensions are enabled per package (e.g.
-- pervasive type level extensions in the code base like `GADTs` or
-- `DataKinds`, etc), or per module (e.g. `CPP` or other more exotic ones).
common GHC
default-language: GHC2021
default-extensions: LambdaCase
ghc-options: -Wall
-Wno-unticked-promoted-constructors
-Wcompat
Expand All @@ -43,33 +31,40 @@ library
-Wpartial-fields
-Widentities
-Wredundant-constraints
-Wunused-packages

library cborg
visibility: public
exposed-modules: Network.TypedProtocol.Codec.CBOR

build-depends: base,
bytestring >=0.10 && <0.13,
cborg >=0.2.1 && <0.3,
singletons,
primitive,
library
import: GHC
exposed-modules: Network.TypedProtocol
, Network.TypedProtocol.Core
, Network.TypedProtocol.Peer
, Network.TypedProtocol.Peer.Client
, Network.TypedProtocol.Peer.Server
, Network.TypedProtocol.Codec
, Network.TypedProtocol.Driver
, Network.TypedProtocol.Proofs
other-modules: Network.TypedProtocol.Lemmas
build-depends: base >=4.12 && <4.22,
io-classes:io-classes ^>= 1.8,
singletons ^>= 3.0
hs-source-dirs: src
default-extensions: DataKinds
GADTs

io-classes:io-classes,
typed-protocols:typed-protocols
library cborg
import: GHC
visibility: public
exposed-modules: Network.TypedProtocol.Codec.CBOR
build-depends: base,
bytestring >=0.10 && <0.13,
cborg >=0.2.1 && <0.3,

hs-source-dirs: cborg
default-language: GHC2021
default-extensions: LambdaCase
ghc-options: -Wall
-Wno-unticked-promoted-constructors
-Wcompat
-Wincomplete-uni-patterns
-Wincomplete-record-updates
-Wpartial-fields
-Widentities
-Wredundant-constraints
io-classes:io-classes,
typed-protocols:typed-protocols
hs-source-dirs: cborg

library stateful
import: GHC
visibility: public
exposed-modules: Network.TypedProtocol.Stateful.Peer
, Network.TypedProtocol.Stateful.Peer.Client
Expand All @@ -81,124 +76,88 @@ library stateful
singletons,
io-classes:io-classes,
typed-protocols:typed-protocols

hs-source-dirs: stateful
default-language: GHC2021
default-extensions: DataKinds
GADTs
ImportQualifiedPost
ghc-options: -Wall
-Wno-unticked-promoted-constructors
-Wcompat
-Wincomplete-uni-patterns
-Wincomplete-record-updates
-Wpartial-fields
-Widentities
-Wredundant-constraints

library stateful-cborg
visibility: public
exposed-modules: Network.TypedProtocol.Stateful.Codec.CBOR

build-depends: base,
bytestring,
cborg,
singletons,
import: GHC
visibility: public
exposed-modules: Network.TypedProtocol.Stateful.Codec.CBOR

io-classes:io-classes,
typed-protocols:{typed-protocols,cborg,stateful}
build-depends: base,
bytestring,
cborg,

hs-source-dirs: stateful-cborg
default-language: GHC2021
io-classes:io-classes,
typed-protocols:{typed-protocols,cborg,stateful}
hs-source-dirs: stateful-cborg
default-extensions: ImportQualifiedPost
ghc-options: -Wall
-Wno-unticked-promoted-constructors
-Wcompat
-Wincomplete-uni-patterns
-Wincomplete-record-updates
-Wpartial-fields
-Widentities
-Wredundant-constraints

library examples
visibility: public
exposed-modules: Network.TypedProtocol.Channel
, Network.TypedProtocol.Driver.Simple

, Network.TypedProtocol.PingPong.Type
, Network.TypedProtocol.PingPong.Client
, Network.TypedProtocol.PingPong.Server
, Network.TypedProtocol.PingPong.Codec
, Network.TypedProtocol.PingPong.Codec.CBOR
, Network.TypedProtocol.PingPong.Examples

, Network.TypedProtocol.ReqResp.Type
, Network.TypedProtocol.ReqResp.Client
, Network.TypedProtocol.ReqResp.Server
, Network.TypedProtocol.ReqResp.Codec
, Network.TypedProtocol.ReqResp.Codec.CBOR
, Network.TypedProtocol.ReqResp.Examples

, Network.TypedProtocol.ReqResp2.Type
, Network.TypedProtocol.ReqResp2.Client

, Network.TypedProtocol.Stateful.ReqResp.Type
, Network.TypedProtocol.Stateful.ReqResp.Client
, Network.TypedProtocol.Stateful.ReqResp.Server
, Network.TypedProtocol.Stateful.ReqResp.Codec
, Network.TypedProtocol.Stateful.ReqResp.Examples

, Network.TypedProtocol.Trans.Wedge
build-depends: base,
bytestring,
cborg,
serialise,
singletons,
contra-tracer,
io-classes:{io-classes, si-timers},
network,
time,
typed-protocols:{typed-protocols,cborg,stateful}

hs-source-dirs: examples
default-language: GHC2021
import: GHC
visibility: public
exposed-modules: Network.TypedProtocol.Channel
, Network.TypedProtocol.Driver.Simple

, Network.TypedProtocol.PingPong.Type
, Network.TypedProtocol.PingPong.Client
, Network.TypedProtocol.PingPong.Server
, Network.TypedProtocol.PingPong.Codec
, Network.TypedProtocol.PingPong.Codec.CBOR
, Network.TypedProtocol.PingPong.Examples

, Network.TypedProtocol.ReqResp.Type
, Network.TypedProtocol.ReqResp.Client
, Network.TypedProtocol.ReqResp.Server
, Network.TypedProtocol.ReqResp.Codec
, Network.TypedProtocol.ReqResp.Codec.CBOR
, Network.TypedProtocol.ReqResp.Examples

, Network.TypedProtocol.ReqResp2.Type
, Network.TypedProtocol.ReqResp2.Client

, Network.TypedProtocol.Stateful.ReqResp.Type
, Network.TypedProtocol.Stateful.ReqResp.Client
, Network.TypedProtocol.Stateful.ReqResp.Server
, Network.TypedProtocol.Stateful.ReqResp.Codec
, Network.TypedProtocol.Stateful.ReqResp.Examples

, Network.TypedProtocol.Trans.Wedge
build-depends: base,
bytestring,
cborg,
serialise,
singletons,
contra-tracer,
io-classes:{io-classes, si-timers},
typed-protocols:{typed-protocols,cborg,stateful}
if !os(windows)
build-depends: network
hs-source-dirs: examples
default-extensions: DataKinds
GADTs
LambdaCase
ghc-options: -Wall
-Wno-unticked-promoted-constructors
-Wcompat
-Wincomplete-uni-patterns
-Wincomplete-record-updates
-Wpartial-fields
-Widentities
-Wredundant-constraints

test-suite test
type: exitcode-stdio-1.0
main-is: Main.hs
hs-source-dirs: test
default-language: GHC2021
import: GHC
type: exitcode-stdio-1.0
main-is: Main.hs
hs-source-dirs: test
default-extensions: GADTs
LambdaCase
other-modules: Network.TypedProtocol.PingPong.Tests
, Network.TypedProtocol.ReqResp.Tests
build-depends: base
, bytestring
, contra-tracer
, typed-protocols:{typed-protocols,cborg,examples}
, io-classes:{io-classes,si-timers}
, io-sim
, QuickCheck
, tasty
, tasty-quickcheck

other-modules: Network.TypedProtocol.PingPong.Tests
, Network.TypedProtocol.ReqResp.Tests
build-depends: base
, bytestring
, contra-tracer
, typed-protocols:{typed-protocols,examples}
, io-classes:io-classes
, io-sim
, QuickCheck
, tasty
, tasty-quickcheck
if !os(windows)
build-depends: directory
, network
, unix

ghc-options: -rtsopts
-Wall
-Wno-unticked-promoted-constructors
-Wno-orphans
ghc-options: -rtsopts