úÎ!6{3©*      !"#$%&'()(c) Evgeny PoberezkinBSD3evgeny@poberezkin.com experimental non-portableSafe-.HUV protocolPInjects the state of some party into the party's position in the list of states.protocol8Projects the state of one party from the list of states.protocol+Extracts party from command type parameter.(c) Evgeny PoberezkinBSD3evgeny@poberezkin.com experimental non-portableNone &'-.HSX*Ý protocol+Type synonym to create protocol data type (  wrapped in * - parameterized free monad):cmdC - user-defined command type constructor that should have the kind  .partiesŽ - type-level list of participants - it defines the order of participant states in the combined state of the system described by the protocol. protocolQProtocol data type that wraps a command and explicitly adds command participants.ºIts only constructor that is not exported adds command participants and combines participant states in type-level list so that they can be chained in type-aligned sequence of commands: ´ProtocolCmd :: Sing (from :: p) -> Sing (to :: p) -> cmd '(from, Prj ps s from, fs') '(to, Prj ps s to, ts') a -> ProtocolCmd cmd ps s (Inj ps (Inj ps s from fs') to ts') aHere:from( - type of party that sends the command.toA - type of party that executes command (e.g., provides some API). t type synonym should be used to construct this type, and function '(->:)' should be used instead of the constructor. protocol2Defines the kind of the command data type used by  :party† - the type (normally enumerable) that defines parties of the protocol (here it is used as a kind). This type should be singletonized.state+ - the kind of the protocol resource state.—The first type-level tuple in command constructors defines the party that sends the command, with the initial and final resource states for that party.uThe second tuple defines the party that executes command (e.g., provides some api) with its initial final and states.See  ./Control-Protocol-Example.htmlControl.Protocol.Example for command example. protocol!Function that wraps command into  . type converted into free parameterized monad. protocol : interprets protocol scenario in any monad, using passed runCmd. function that interprets individual commands. protocolparty that sends commandprotocolparty that executes commandprotocolMcommand - its initial states for both parties are projected from system stateprotocol>final protocol state injects final states of both participants protocolfunction to interpret a commandprotocol"protocol scenario (see example in )   6(c) Evgeny PoberezkinBSD3evgeny@poberezkin.com experimental non-portableNone&'+-./1HSVXfk2ÎprotocolExample protocol type.protocol"Example command data type of kind    .protocol\Example type defining the possible resource states, in this case some communication channel.protocolExample protocol scenario.If you modify this scenario to  before channel is  d or to N two messages in a row without forwarding them, the scenario will not compile.Safe3„+,-./0123      !"#$%&'()*+,-./0123456789:;'protocol-0.1.0.1-AqzCpLZ2Spw3ZykB7wuDPYControl.Protocol.ExampleControl.Protocol.InternalControl.ProtocolScenarioPaths_protocolParty RecipientBrokerSender StateErrorNoPartyInjPrjPProtocol ProtocolCmdCommand->: runProtocol MyProtocol MyCommandCreateNotifySendForward ChannelStateNoneReadyBusyscenario$fSingIPartySender$fSingIPartyBroker$fSingIPartyRecipient$fSDecideParty $fSEqParty $fSShowParty$fSingKindParty;$fSuppressUnusedWarnings->ShowsPrec_6989586621679083583Sym2;$fSuppressUnusedWarnings->ShowsPrec_6989586621679083583Sym1 $fPShowParty;$fSuppressUnusedWarnings->ShowsPrec_6989586621679083583Sym0 $fPEqParty $fShowParty $fEqParty$fShowChannelState$fEqChannelState $fShowSing,freer-indexed-0.1.0.0-HwkTPX7xvgWBweDTTS8J6KControl.XFreerXFreeversion getBinDir getLibDir getDynLibDir getDataDir getLibexecDir getSysconfDirgetDataFileName