Copyright | (c) Evgeny Poberezkin |
---|---|
License | BSD3 |
Maintainer | evgeny@poberezkin.com |
Stability | experimental |
Portability | non-portable |
Safe Haskell | None |
Language | Haskell2010 |
Example command and protocol definition.
Documentation
data MyCommand :: Command Party ChannelState where Source #
Example command data type of kind
.Command
Party
ChannelState
Create :: MyCommand '(Recipient, None, Ready) '(Broker, None, Ready) () | |
Notify :: MyCommand '(Recipient, Ready, Ready) '(Sender, None, Ready) () | |
Send :: String -> MyCommand '(Sender, Ready, Ready) '(Broker, Ready, Busy) () | |
Forward :: MyCommand '(Broker, Busy, Ready) '(Recipient, Ready, Ready) String |
Instances
Eq Party Source # | |
Show Party Source # | |
PShow Party Source # | |
SShow Party Source # | |
SEq Party Source # | |
PEq Party Source # | |
SDecide Party Source # | |
SingKind Party Source # | |
SingI Recipient Source # | |
Defined in Control.Protocol.Example | |
SingI Broker Source # | |
Defined in Control.Protocol.Example | |
SingI Sender Source # | |
Defined in Control.Protocol.Example | |
Show (Sing z) Source # | |
data Sing (a :: Party) Source # | |
type Demote Party Source # | |
Defined in Control.Protocol.Example | |
type Show_ (arg :: Party) Source # | |
type ShowList (arg :: [Party]) arg1 Source # | |
type (x :: Party) /= (y :: Party) Source # | |
type (a :: Party) == (b :: Party) Source # | |
Defined in Control.Protocol.Example | |
type ShowsPrec a1 (a2 :: Party) a3 Source # | |
Defined in Control.Protocol.Example |
data ChannelState Source #
Example type defining the possible resource states, in this case some communication channel.
Instances
Eq ChannelState Source # | |
Defined in Control.Protocol.Example (==) :: ChannelState -> ChannelState -> Bool # (/=) :: ChannelState -> ChannelState -> Bool # | |
Show ChannelState Source # | |
Defined in Control.Protocol.Example showsPrec :: Int -> ChannelState -> ShowS # show :: ChannelState -> String # showList :: [ChannelState] -> ShowS # |