ouroboros-network-framework
Safe HaskellNone
LanguageHaskell2010

Ouroboros.Network.MuxMode

Description

Singletons to work with MuxMode kind.

Synopsis

Documentation

data SingMuxMode (mode :: Mode) where Source #

Singletons for matching the MuxMode at term level.

data SingHasInitiator (mode :: Mode) where Source #

Singleton for to match the HasInitiator mode ~ True constraint.

Constructors

SingHasInitiator :: forall (mode :: Mode). HasInitiator mode ~ 'True => SingHasInitiator mode 
SingNoInitiator :: forall (mode :: Mode). HasInitiator mode ~ 'False => SingHasInitiator mode 

hasInitiatorMode :: forall (mode :: Mode). SingMuxMode mode -> SingHasInitiator mode Source #

data WithMuxMode (mode :: Mode) a b where Source #

Constructors

WithInitiatorMode :: forall a b. a -> WithMuxMode 'InitiatorMode a b 
WithResponderMode :: forall b a. b -> WithMuxMode 'ResponderMode a b 
WithInitiatorResponderMode :: forall a b. a -> b -> WithMuxMode 'InitiatorResponderMode a b 

type WithMuxTuple (mode :: Mode) a = WithMuxMode mode a a Source #

withInitiatorMode :: forall (mode :: Mode) a b. HasInitiator mode ~ 'True => WithMuxMode mode a b -> a Source #

withResponderMode :: forall (mode :: Mode) a b. HasResponder mode ~ 'True => WithMuxMode mode a b -> b Source #

data InResponderMode (mode :: Mode) a where Source #

Constructors

InResponderMode :: forall (mode :: Mode) a. HasResponder mode ~ 'True => a -> InResponderMode mode a 
NotInResponderMode :: forall (mode :: Mode) a. InResponderMode mode a