File tree Expand file tree Collapse file tree 4 files changed +20
-9
lines changed
typed-protocols-stateful/src/Network/TypedProtocol/Stateful
typed-protocols/src/Network/TypedProtocol Expand file tree Collapse file tree 4 files changed +20
-9
lines changed Original file line number Diff line number Diff line change 1- index-state : 2025-01-30T00:54 :30Z
1+ index-state : 2025-05-05T00:00 :00Z
22
33packages : ./typed-protocols
44 ./typed-protocols-cborg
@@ -11,11 +11,8 @@ test-show-details: direct
1111
1212if impl(ghc >= 9.12 )
1313 allow-newer :
14- -- https://github.com/well-typed/cborg/pull/339
15- , cborg :base
16- , cborg :ghc-prim
17- , serialise :base
18- , serialise :ghc-prim
14+ , serdoc-core :template-haskell
15+ , serdoc-core :th-abstraction
1916
2017if os(windows)
2118 package text
Original file line number Diff line number Diff line change @@ -40,7 +40,7 @@ library
4040 , base64-bytestring >= 1.2.1.0 && < 1.3
4141 , blaze-html >= 0.9.1.2 && < 0.10
4242 , bytestring >= 0.11 && < 0.13
43- , containers >= 0.6.8 && < 0.7
43+ , containers >= 0.6.8 && < 0.8
4444 , fgl >= 5.7 && < 5.9
4545 , filepath >= 1.4.2.2 && < 1.6
4646 , graphviz >= 2999.20.1 && < 2999.21.0
@@ -51,7 +51,7 @@ library
5151 , template-haskell >= 2.13.0.0
5252 , temporary >= 1.3 && < 1.4
5353 , text >= 1.1 && < 2.2
54- , th-abstraction >= 0.6.0.0 && < 0.7
54+ , th-abstraction >= 0.6.0.0 && < 0.8
5555 , time >= 1.12 && < 1.14
5656 , serdoc-core
5757 , typed-protocols
Original file line number Diff line number Diff line change @@ -67,7 +67,14 @@ import Network.TypedProtocol.Core as Core
6767-- 'Network.TypedProtocol.Peer.Client' or 'Network.TypedProtocol.Peer.Server'
6868-- pattern synonyms provide this evidence automatically.
6969--
70- -- TODO:
70+ -- __NOTE__:
71+ -- one should not allocate resources within a `Peer` since there's no way to
72+ -- safely clean-up resources in case of an asynchronous exception. The proper
73+ -- way to allocate resources is to call
74+ -- `Network.TypedProtocol.Stateful.Driver.runPeerWithDriver` within
75+ -- a `Control.Exception.bracket`.
76+ --
77+ -- __TODO__:
7178-- We are not exposing pipelined version, since it is not possible to write
7279-- a driver & proofs in a type safe which take into account the state when the
7380-- peer type only tracks depth of pipelining rather than pipelined transitions.
Original file line number Diff line number Diff line change @@ -79,6 +79,13 @@ import Network.TypedProtocol.Core as Core
7979-- "Network.TypedProtocol.Peer.Client" supply this evidence for you, and hence
8080-- are easier to use and let you avoid some kinds of type errors.
8181--
82+ -- __NOTE__:
83+ -- one should not allocate resources within a `Peer` since there's no way to
84+ -- safely clean-up resources in case of an asynchronous exception. The proper
85+ -- way to allocate resources is to call
86+ -- `Network.TypedProtocol.Driver.runPeerWithDriver` (or `runPeer`,
87+ -- `runPipelinedPeer`) within a `Control.Exception.bracket`.
88+ --
8289type Peer :: forall ps
8390 -> PeerRole
8491 -> IsPipelined
You can’t perform that action at this time.
0 commit comments