dmq-node
Safe HaskellNone
LanguageHaskell2010

DMQ.Protocol.LocalMsgNotification.Type

Description

Defines types for the local message notification protocol

Synopsis

Documentation

data LocalMsgNotification msg where Source #

The kind of the local message notification protocol, and the types of the states in the protocol state machine.

It is parameterised over the type of messages

Constructors

StIdle :: forall msg. LocalMsgNotification msg 
StBusy :: forall msg. StBlockingStyle -> LocalMsgNotification msg 
StDone :: forall msg. LocalMsgNotification msg 

Instances

Instances details
ShowProxy msg => ShowProxy (LocalMsgNotification msg :: Type) Source # 
Instance details

Defined in DMQ.Protocol.LocalMsgNotification.Type

ToJSON sig => ToJSON (AnyMessage (LocalMsgNotification sig)) Source # 
Instance details

Defined in DMQ.Protocol.LocalMsgNotification.Type

Protocol (LocalMsgNotification msg) Source #

There are some constraints of the protocol that are not captured in the types of the messages, but are documented with the messages. Violation of these constraints is also a protocol error. The constraints are intended to ensure that implementations are able to work in bounded space.

Instance details

Defined in DMQ.Protocol.LocalMsgNotification.Type

Associated Types

type StateToken 
Instance details

Defined in DMQ.Protocol.LocalMsgNotification.Type

StateTokenI ('StDone :: LocalMsgNotification msg) Source # 
Instance details

Defined in DMQ.Protocol.LocalMsgNotification.Type

StateTokenI ('StIdle :: LocalMsgNotification msg) Source # 
Instance details

Defined in DMQ.Protocol.LocalMsgNotification.Type

SingI blocking => StateTokenI ('StBusy blocking :: LocalMsgNotification msg) Source # 
Instance details

Defined in DMQ.Protocol.LocalMsgNotification.Type

Methods

stateToken :: StateToken ('StBusy blocking :: LocalMsgNotification msg) #

Show msg => Show (Message (LocalMsgNotification msg) from to) Source # 
Instance details

Defined in DMQ.Protocol.LocalMsgNotification.Type

Methods

showsPrec :: Int -> Message (LocalMsgNotification msg) from to -> ShowS #

show :: Message (LocalMsgNotification msg) from to -> String #

showList :: [Message (LocalMsgNotification msg) from to] -> ShowS #

Eq msg => Eq (Message (LocalMsgNotification msg) from to) Source # 
Instance details

Defined in DMQ.Protocol.LocalMsgNotification.Type

Methods

(==) :: Message (LocalMsgNotification msg) from to -> Message (LocalMsgNotification msg) from to -> Bool #

(/=) :: Message (LocalMsgNotification msg) from to -> Message (LocalMsgNotification msg) from to -> Bool #

data Message (LocalMsgNotification msg) (from :: LocalMsgNotification msg) (to :: LocalMsgNotification msg) Source # 
Instance details

Defined in DMQ.Protocol.LocalMsgNotification.Type

data Message (LocalMsgNotification msg) (from :: LocalMsgNotification msg) (to :: LocalMsgNotification msg) where
type StateToken Source # 
Instance details

Defined in DMQ.Protocol.LocalMsgNotification.Type

type StateAgency ('StDone :: LocalMsgNotification msg) Source # 
Instance details

Defined in DMQ.Protocol.LocalMsgNotification.Type

type StateAgency ('StIdle :: LocalMsgNotification msg) Source # 
Instance details

Defined in DMQ.Protocol.LocalMsgNotification.Type

type StateAgency ('StBusy blocking :: LocalMsgNotification msg) Source # 
Instance details

Defined in DMQ.Protocol.LocalMsgNotification.Type

data SingMsgNotification (k :: LocalMsgNotification msg) where Source #

a singleton witness for protocol state

Constructors

SingIdle :: forall {msg}. SingMsgNotification ('StIdle :: LocalMsgNotification msg) 
SingBusy :: forall {msg} (blocking :: StBlockingStyle). SingBlockingStyle blocking -> SingMsgNotification ('StBusy blocking :: LocalMsgNotification msg) 
SingDone :: forall {msg}. SingMsgNotification ('StDone :: LocalMsgNotification msg) 

MsgRequest :: forall (blocking :: StBlockingStyle) msg. SingI blocking => SingBlockingStyle blocking %1 -> Message (LocalMsgNotification msg) ('StIdle :: LocalMsgNotification msg) ('StBusy blocking :: LocalMsgNotification msg) Source #

MsgReply :: forall (blocking :: StBlockingStyle) msg. BlockingReplyList blocking msg %1 -> HasMore %1 -> Message (LocalMsgNotification msg) ('StBusy blocking :: LocalMsgNotification msg) ('StIdle :: LocalMsgNotification msg) Source #

data StBusy (x0 :: StBlockingStyle) :: LocalMsgNotification msg Source #

Instances

Instances details
SingI blocking => StateTokenI ('StBusy blocking :: LocalMsgNotification msg) Source # 
Instance details

Defined in DMQ.Protocol.LocalMsgNotification.Type

Methods

stateToken :: StateToken ('StBusy blocking :: LocalMsgNotification msg) #

type StateAgency ('StBusy blocking :: LocalMsgNotification msg) Source # 
Instance details

Defined in DMQ.Protocol.LocalMsgNotification.Type

data HasMore Source #

A boolean-like to indicate whether the server has more messages that it can provide.

Constructors

HasMore 
DoesNotHaveMore 

Instances

Instances details
Show HasMore Source # 
Instance details

Defined in DMQ.Protocol.LocalMsgNotification.Type

Eq HasMore Source # 
Instance details

Defined in DMQ.Protocol.LocalMsgNotification.Type

Methods

(==) :: HasMore -> HasMore -> Bool #

(/=) :: HasMore -> HasMore -> Bool #

data BlockingReplyList (blocking :: StBlockingStyle) a where #

Constructors

BlockingReply :: forall a. NonEmpty a -> BlockingReplyList 'StBlocking a 
NonBlockingReply :: forall a. [a] -> BlockingReplyList 'StNonBlocking a 

Instances

Instances details
Foldable (BlockingReplyList blocking) 
Instance details

Defined in Ouroboros.Network.Protocol.TxSubmission2.Type

Methods

fold :: Monoid m => BlockingReplyList blocking m -> m #

foldMap :: Monoid m => (a -> m) -> BlockingReplyList blocking a -> m #

foldMap' :: Monoid m => (a -> m) -> BlockingReplyList blocking a -> m #

foldr :: (a -> b -> b) -> b -> BlockingReplyList blocking a -> b #

foldr' :: (a -> b -> b) -> b -> BlockingReplyList blocking a -> b #

foldl :: (b -> a -> b) -> b -> BlockingReplyList blocking a -> b #

foldl' :: (b -> a -> b) -> b -> BlockingReplyList blocking a -> b #

foldr1 :: (a -> a -> a) -> BlockingReplyList blocking a -> a #

foldl1 :: (a -> a -> a) -> BlockingReplyList blocking a -> a #

toList :: BlockingReplyList blocking a -> [a] #

null :: BlockingReplyList blocking a -> Bool #

length :: BlockingReplyList blocking a -> Int #

elem :: Eq a => a -> BlockingReplyList blocking a -> Bool #

maximum :: Ord a => BlockingReplyList blocking a -> a #

minimum :: Ord a => BlockingReplyList blocking a -> a #

sum :: Num a => BlockingReplyList blocking a -> a #

product :: Num a => BlockingReplyList blocking a -> a #

NFData a => NFData (BlockingReplyList blocking a) 
Instance details

Defined in Ouroboros.Network.Protocol.TxSubmission2.Type

Methods

rnf :: BlockingReplyList blocking a -> () #

Show a => Show (BlockingReplyList blocking a) 
Instance details

Defined in Ouroboros.Network.Protocol.TxSubmission2.Type

Methods

showsPrec :: Int -> BlockingReplyList blocking a -> ShowS #

show :: BlockingReplyList blocking a -> String #

showList :: [BlockingReplyList blocking a] -> ShowS #

Eq a => Eq (BlockingReplyList blocking a) 
Instance details

Defined in Ouroboros.Network.Protocol.TxSubmission2.Type

Methods

(==) :: BlockingReplyList blocking a -> BlockingReplyList blocking a -> Bool #

(/=) :: BlockingReplyList blocking a -> BlockingReplyList blocking a -> Bool #