Copyright | (c) Matthew Naylor 2021 Alexandre Joannou 2021 |
---|---|
License | MIT |
Maintainer | mattfn@gmail.com |
Stability | experimental |
Safe Haskell | Safe-Inferred |
Language | GHC2021 |
Blarney.ClientServer
Synopsis
- data Client req_t resp_t = Client {}
- data Server req_t resp_t = Server {}
- debugClient :: (FShow req_t, FShow resp_t) => Client req_t resp_t -> Format -> Client req_t resp_t
- debugServer :: (FShow req_t, FShow resp_t) => Server req_t resp_t -> Format -> Server req_t resp_t
- nullServer :: Bits resp_t => Server req_t resp_t
- nullClient :: Bits req_t => Client req_t resp_t
Documentation
data Client req_t resp_t Source #
Clients produce requests and consume responses
Instances
Generic (Client req_t resp_t) # | |
(Interface req_t, Interface resp_t, Bits resp_t) => Interface (Client req_t resp_t) # | |
Connectable (Client req_t resp_t) (Server req_t resp_t) # | |
Defined in Blarney.ClientServer | |
type Rep (Client req_t resp_t) # | |
Defined in Blarney.ClientServer type Rep (Client req_t resp_t) = D1 ('MetaData "Client" "Blarney.ClientServer" "blarney-0.1.0.0-inplace" 'False) (C1 ('MetaCons "Client" 'PrefixI 'True) (S1 ('MetaSel ('Just "reqs") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Source req_t)) :*: S1 ('MetaSel ('Just "resps") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Sink resp_t)))) |
data Server req_t resp_t Source #
Servers consume requests and produce responses
Instances
Generic (Server req_t resp_t) # | |
(Bits req_t, Interface req_t, Interface resp_t) => Interface (Server req_t resp_t) # | |
Connectable (Client req_t resp_t) (Server req_t resp_t) # | |
Defined in Blarney.ClientServer | |
type Rep (Server req_t resp_t) # | |
Defined in Blarney.ClientServer type Rep (Server req_t resp_t) = D1 ('MetaData "Server" "Blarney.ClientServer" "blarney-0.1.0.0-inplace" 'False) (C1 ('MetaCons "Server" 'PrefixI 'True) (S1 ('MetaSel ('Just "reqs") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Sink req_t)) :*: S1 ('MetaSel ('Just "resps") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Source resp_t)))) |
debugClient :: (FShow req_t, FShow resp_t) => Client req_t resp_t -> Format -> Client req_t resp_t Source #
Add debug displays to client's source and sink
debugServer :: (FShow req_t, FShow resp_t) => Server req_t resp_t -> Format -> Server req_t resp_t Source #
Add debug displays to servers's source and sink
nullServer :: Bits resp_t => Server req_t resp_t Source #
Server that ignores all requests and generates no responses
nullClient :: Bits req_t => Client req_t resp_t Source #
Client that ignores all responses and generates no requests