blarney-0.1.0.0
Copyright(c) Matthew Naylor 2021 Alexandre Joannou 2021
LicenseMIT
Maintainermattfn@gmail.com
Stabilityexperimental
Safe HaskellSafe-Inferred
LanguageGHC2021

Blarney.ClientServer

Description

This module defines the Client and Server types.

Synopsis

Documentation

data Client req_t resp_t Source #

Clients produce requests and consume responses

Constructors

Client 

Fields

Instances

Instances details
Generic (Client req_t resp_t) # 
Instance details

Defined in Blarney.ClientServer

Associated Types

type Rep (Client req_t resp_t) :: Type -> Type #

Methods

from :: Client req_t resp_t -> Rep (Client req_t resp_t) x #

to :: Rep (Client req_t resp_t) x -> Client req_t resp_t #

(Interface req_t, Interface resp_t, Bits resp_t) => Interface (Client req_t resp_t) # 
Instance details

Defined in Blarney.ClientServer

Methods

toIfc :: Client req_t resp_t -> (IfcTerm, IfcType) Source #

fromIfc :: IfcTerm -> Client req_t resp_t Source #

Connectable (Client req_t resp_t) (Server req_t resp_t) # 
Instance details

Defined in Blarney.ClientServer

Methods

makeConnection :: Client req_t resp_t -> Server req_t resp_t -> Module () Source #

type Rep (Client req_t resp_t) # 
Instance details

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

Constructors

Server 

Fields

Instances

Instances details
Generic (Server req_t resp_t) # 
Instance details

Defined in Blarney.ClientServer

Associated Types

type Rep (Server req_t resp_t) :: Type -> Type #

Methods

from :: Server req_t resp_t -> Rep (Server req_t resp_t) x #

to :: Rep (Server req_t resp_t) x -> Server req_t resp_t #

(Bits req_t, Interface req_t, Interface resp_t) => Interface (Server req_t resp_t) # 
Instance details

Defined in Blarney.ClientServer

Methods

toIfc :: Server req_t resp_t -> (IfcTerm, IfcType) Source #

fromIfc :: IfcTerm -> Server req_t resp_t Source #

Connectable (Client req_t resp_t) (Server req_t resp_t) # 
Instance details

Defined in Blarney.ClientServer

Methods

makeConnection :: Client req_t resp_t -> Server req_t resp_t -> Module () Source #

type Rep (Server req_t resp_t) # 
Instance details

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