typed-protocols-examples
Safe HaskellNone
LanguageHaskell2010

Network.TypedProtocol.Trans.Wedge

Synopsis

Documentation

data Wedge ps (stIdle :: ps) ps' (stIdle' :: ps') where Source #

A wedge sum of two protocols.

One can interleave both protocols using protocol pipelining. Termination must be done by terminating one of the protocols.

Constructors

StIdle :: forall ps (stIdle :: ps) ps' (stIdle' :: ps'). Wedge ps stIdle ps' stIdle' 
StFst :: forall ps (stIdle :: ps) ps' (stIdle' :: ps'). ps -> Wedge ps stIdle ps' stIdle' 
StSnd :: forall ps' ps (stIdle :: ps) (stIdle' :: ps'). ps' -> Wedge ps stIdle ps' stIdle' 

Instances

Instances details
Protocol (Wedge ps stIdle ps' stIdle') Source # 
Instance details

Defined in Network.TypedProtocol.Trans.Wedge

Associated Types

type StateToken 
Instance details

Defined in Network.TypedProtocol.Trans.Wedge

type StateToken = SingWedge :: Wedge ps stIdle ps' stIdle' -> Type
StateTokenI ('StIdle :: Wedge ps stIdle ps' stIdle') Source # 
Instance details

Defined in Network.TypedProtocol.Trans.Wedge

Methods

stateToken :: StateToken ('StIdle :: Wedge ps stIdle ps' stIdle') #

StateTokenI st => StateTokenI ('StFst st :: Wedge ps stIdle ps' stIdle') Source # 
Instance details

Defined in Network.TypedProtocol.Trans.Wedge

Methods

stateToken :: StateToken ('StFst st :: Wedge ps stIdle ps' stIdle') #

StateTokenI st => StateTokenI ('StSnd st :: Wedge ps stIdle ps' stIdle') Source # 
Instance details

Defined in Network.TypedProtocol.Trans.Wedge

Methods

stateToken :: StateToken ('StSnd st :: Wedge ps stIdle ps' stIdle') #

data Message (Wedge ps stIdle ps' stIdle') (from :: Wedge ps stIdle ps' stIdle') (to :: Wedge ps stIdle ps' stIdle') Source # 
Instance details

Defined in Network.TypedProtocol.Trans.Wedge

data Message (Wedge ps stIdle ps' stIdle') (from :: Wedge ps stIdle ps' stIdle') (to :: Wedge ps stIdle ps' stIdle') where
type StateToken Source # 
Instance details

Defined in Network.TypedProtocol.Trans.Wedge

type StateToken = SingWedge :: Wedge ps stIdle ps' stIdle' -> Type
type StateAgency ('StIdle :: Wedge ps stIdle ps' stIdle') Source # 
Instance details

Defined in Network.TypedProtocol.Trans.Wedge

type StateAgency ('StIdle :: Wedge ps stIdle ps' stIdle') = 'ClientAgency
type StateAgency ('StFst st :: Wedge ps stIdle ps' stIdle') Source # 
Instance details

Defined in Network.TypedProtocol.Trans.Wedge

type StateAgency ('StFst st :: Wedge ps stIdle ps' stIdle') = StateAgency st
type StateAgency ('StSnd st :: Wedge ps stIdle ps' stIdle') Source # 
Instance details

Defined in Network.TypedProtocol.Trans.Wedge

type StateAgency ('StSnd st :: Wedge ps stIdle ps' stIdle') = StateAgency st

data SingWedge (st :: Wedge ps stIdle ps' stIdle') where Source #

Constructors

SingStIdle :: forall {ps} {stIdle :: ps} {ps'} {stIdle' :: ps'}. SingWedge ('StIdle :: Wedge ps stIdle ps' stIdle') 
SingStFst :: forall {ps} {stIdle :: ps} {ps'} {stIdle' :: ps'} (st1 :: ps). StateToken st1 -> SingWedge ('StFst st1 :: Wedge ps stIdle ps' stIdle') 
SingStSnd :: forall {ps'} {ps} {stIdle :: ps} {stIdle' :: ps'} (st' :: ps'). StateToken st' -> SingWedge ('StSnd st' :: Wedge ps stIdle ps' stIdle') 

Instances

Instances details
Show (StateToken st) => Show (SingWedge ('StFst st :: Wedge ps stIdle ps' stIdle')) Source # 
Instance details

Defined in Network.TypedProtocol.Trans.Wedge

Methods

showsPrec :: Int -> SingWedge ('StFst st :: Wedge ps stIdle ps' stIdle') -> ShowS #

show :: SingWedge ('StFst st :: Wedge ps stIdle ps' stIdle') -> String #

showList :: [SingWedge ('StFst st :: Wedge ps stIdle ps' stIdle')] -> ShowS #

Show (SingWedge ('StIdle :: Wedge ps stIdle ps' stIdle')) Source # 
Instance details

Defined in Network.TypedProtocol.Trans.Wedge

Methods

showsPrec :: Int -> SingWedge ('StIdle :: Wedge ps stIdle ps' stIdle') -> ShowS #

show :: SingWedge ('StIdle :: Wedge ps stIdle ps' stIdle') -> String #

showList :: [SingWedge ('StIdle :: Wedge ps stIdle ps' stIdle')] -> ShowS #

Show (StateToken st) => Show (SingWedge ('StSnd st :: Wedge ps stIdle ps' stIdle')) Source # 
Instance details

Defined in Network.TypedProtocol.Trans.Wedge

Methods

showsPrec :: Int -> SingWedge ('StSnd st :: Wedge ps stIdle ps' stIdle') -> ShowS #

show :: SingWedge ('StSnd st :: Wedge ps stIdle ps' stIdle') -> String #

showList :: [SingWedge ('StSnd st :: Wedge ps stIdle ps' stIdle')] -> ShowS #

data SingStart (st :: Wedge ps stIdle ps' stIdle') where Source #

A Singleton type which allows to pick the starting protocol state.

Constructors

AtFst :: forall {ps} {stIdle :: ps} {ps'} {stIdle' :: ps'} (stIdle1 :: ps). SingStart ('StFst stIdle1 :: Wedge ps stIdle ps' stIdle') 
AtSnd :: forall {ps'} {ps} {stIdle :: ps} {stIdle' :: ps'} (stIdle1 :: ps'). SingStart ('StSnd stIdle1 :: Wedge ps stIdle ps' stIdle')