!)      !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrs t u v w x y z { | } ~  None-06;=>?CFSTV3 JIndexed monad transformer that is indexed by two products of session typesThis monad also acts as a state monad that whose state is defined by a session typed channel and dependent on the indexing of the monad. 0Type class for recursion on a session typed port$IType class that defines combinators for branching on a session typed port%;select the first branch of a selection using the given port&<select the second branch of a selection using the given port';select the first branch of an offering using the given port(<select the second branch of an offering using the given port)Unsession typed typed channelBIt is essentially just a typed channel that is parameterized with 0.!We can carry around this type in Session , but not a +.*Same as +m, but it is given a session type for the send port type and a separate session type for the receive port type+DType synonym for a session typed channel given a single session typeaThis removes recv session types from the given session type as it is passed to the send port typedAlso removes send session types from the given session type as it is passed to the receive port type,tSession typed receive port as a wrapper over ReceivePort Message. It is parameterized with a capability/sessiontype..nSession typed send port as a wrapper over SendPort Message. It is parameterized with a capability/sessiontype.0KBasic message type that existentially quantifies the content of the message2?Creates a new session typed channel given a single session type3cCreates a new session typed channel given separate session types for the send port and receive port4"Creates an unsession typed channel5>Converts an unsession typed channel to a session typed channel6>Converts an unsession typed channel to a session typed channel7/Converts a session typed send port into a Proxy82Converts a session typed receive port into a Proxy9/Sends a message using a session typed send port:5Receives a message using a session typed receive port;Send a message;Only the session type of the send port needs to be adjusted<receive a message>Only the session type of the receive port needs to be adjusted=&select the first branch of a selectionPBoth ports are now adjusted. This is similarly so for the remaining combinators.>'select the second branch of a selection?&select the first branch of an offering@'select the second branch of an offeringAdelimit scope of recursionBweaken scope of recursionC!recursion variable (recurse here)Dports are no longer usable( !"#$%&'()*+,-./0123456789:;<=>?@ABCD(01./,-+*)23456789:$%&'( !"#;<=>?@ABCD !"#$%&'(,-./01None*;=>?FgN=The SessionInfo data type tells us information about another S. Namely, the S that is in a session with the S that this specific N belongs to. PThe  of the dual SQThe  of the Node that the dual S runs onR"A send port belonging to the dual SM, such that we can send messages to it. And a receive port of which the dual SD has its send port, such that we can receive messages from the dual S.SS is defined as a newtype wrapper over a function that takes a `Maybe SessionInfo` and returns an indexed codensity monad transformer over the  monad.SI is also a reader monad that has a Maybe SessionInfo as its environment. N is wrapped in a , because we also allow a session to be run singularly. In which case there is no other Session to communicate with and therefore is there also no need for a N.BThe function returns the indexed codensity monad and not simply a f, because from benchmarking the codensity monad gave us significant performance improvements for free.VEvaluates a session to a WLifts a  computationXLifts a  computation NORPQSTUVWX STUNOPQRVWXNOPQRSTUNone-a_#Applies two types of rewrites to a S.Elimination of unused recursion?Rewrites non-right nested branchings to right nested branchings`0Function for eliminating unused recursive types. The function ` takes a S and traverses the underlying ,. While doing so, it will attempt to remove  constructors annotated with  or N from the program if in doing so does not change the behavior of the program.CFor example, in the following session type we may remove the inner  and the .   R (R (Wk V))We have that the outer 6 matches the recursion variable because of the use of . That means the inner , does not match any recursion variable (the _ is unused) and therefore may it and its corresponding constructor be removed from the session.We also remove the @, because the session type pushed into the context by the inner  has also been removed.The generated session type is R VaFlattening of branching The function a takes a S and traverses the underlying . If it finds a branching session type that has a branch starting with another branching of the same type, then it will extract the branches of the inner branching and inserts these into the outer branching. This is similar to flattening a list of lists to a larger list. For example: Sel '[a,b, Sel '[c,d], e]becomes Sel '[a,b,c,d,e]hThis only works if the inner branching has the same type as the outer branch (Sel in Sel or Off in Off).nAlso, for now this rewrite only works if one of the branching of the outer branch starts with a new branching. For example:  Sel '[a,b, Int :!> Sel '[c,d],e]does not become "Sel '[a,b,Int :!> c, Int :!> d, e]=Although, this is something that will be added in the future._`a_`aNone-jbFor this function the user will act as the dual to the given session. User interaction is only required when the given program does a receive or an offer.'A possible interaction goes as follows: Nprog = do send 5 x <- recv offer (eps x) (eps "") main = interactive prog C> Enter value of type String: "test" > (L)eft or (R)ight: L "test"cDifferent from bh is that this function gives the user the choice to abort the session after each session typed action. ]Furthermore, it also prints additional output describing which session typed action occurred.bcbcNone *-FSTVxdThis function unpacks a S to a  using a given N. It then evaluates the ; by mapping Cloud Haskell semantics to each constructor of .The function relies on that there exists another session (on a different process) that is also being evaluated (using evalSession) and acts as the dual the session that function is now evaluating.@The underlying communication method is a session typed channel (t). There should be no interference from other processes, unless you go through the effort of sharing the send port.e Similar to d=, except for that it does not evaluate session typed actions.Only returns and lifted computations are evaluated. This also means that there does not need to be a dual session that is evaluated on a different process.It also assumes that N is not used. Use f if this is not the case.fSame as e, but you may now provide a N.defdefNone,;=>?FyxihgNone*- jPurely evaluates a given S using the input defined by Stream.UThe output is described in terms of the session type actions within the given program7An example of how to use this function goes as follows:  prog :: Session ('Cap '[] (Int :!> String :?> Eps)) ('Cap '[] Eps) String prog = send 5 >> recv >>= eps strm = S_Send $ S_Recv "foo" S_Eps  run prog strm%O_Send 5 $ O_Recv "foo" $ O_Eps "foo"ktInstead of describing the session typed actions, it returns a list of the results of all branches of all offerings. 8prog = offer (eps 10) (eps 5) strm = S_OffS S_Eps S_Eps runAll prog strm[10,5]lSame as k but applies  to the resulting listrunSingle prog strm10mjo cannot deal with lifted computations. This makes it limited to session typed programs without any use of lift.iThis function allows us to evaluate lifted computations, but as a consequence is no longer entirely pure.nMonadic version of k.oMonad version of lpSession typed version of mqSession typed version of nrSession typed version of o$ jklmnopqr$jklmnopqr  None&'-smData type that encapsulates a single session performing no session typed action that can be remotely spawned.AWe use this data type mostly for convenience in combination with e allowing us to avoid the  constraint.uRData type that encapsulates two sessions for the purpose of remotely spawning themThe session types of the sessions are existentially quantified, but we still ensure duality and constrain them properly, such that they can be passed to d.w6Static function for remotely spawning a single session>When remotely spawning any session we must always pass it the  and  of the spawning process.We must pass a Closure of a s instead of just a s,, because that would require serializing a s which is not possible.!Furthermore, we must also pass a - that shows how to serialize a value of type a.x7Closure function for remotely spawning a single sessionySame as w*, except that we do not need to provide a .zSame as x*, except that we do not need to provide a .{)A static function specific to the lifted   function that can be found in "Control.Distributed.Session.Lifted|!A closure specific to the lifted  function that can be found in "Control.Distributed.Session.Lifted}/Function that evalutes the first argument of a u in a local manner.=It is local in that we do not create an accompanying closure.~AStatic function for remotely evaluating the second argument of a u.This function works dually to }.9Closure for remotely evaluating the second argument of a uSame as ~., except for that we do not need to provide a .Same as ., except for that we do not need to provide a .AStatic function for remotely evaluating the second argument of a u!This function is very similar to b. The difference is that this function assumes that the other session was also remotely spawned. *Therefore we require an extra send of the  of the to be spawned process.9Closure for remotely evaluating the second argument of a u.8Closure for remotely evaluating the first argument of a uThis function acts dual to * and assumes that it will first receive a .8Closure for remotely evaluating the first argument of a u.oRemoteTable that binds all in this module defined static functions to their corresponding evaluation functions.stuvwxyz{|}~uvstwxyz{|}~stuv None*]Unsession typed send Unsafe sendZZ NoneO -Calls a local session consisting of two dual Ss. *Spawns a new local process for the second S and runs the first S on the current process. Returns the result of the first S and the  of the second S.Sessioned version of .Calls a remote session consisting of two dual Ss.'Spawns a remote process for the second S and runs the first S on the current process. Returns the result of the frist S and the  of the second S.8The arguments of this function are described as follows:HStatic (SerializableDict a): Describes how to serialize a value of type a8NodeId: The node identifier of the node that the second S should be spawned to.BClosure (SpawnSession a ()): A closure of a wrapper over two dual Ss. Requires Sessioned version of  Requires Same as z, but we no longer need to provide a static serializable dictionary, because the result type of the first session is unit. Requires Sessioned version of  Requires Spawns a local session.Both Ss are spawned locally. Returns the  of both spawned processes.Sessioned version of  Spawns one S local and spawns another S remote. Returns the  of both spawned processes.'The arguments are described as follows:8NodeId: The node identifier of the node that the second S should be spawned to.CClosure (SpawnSession () ()): A closure of a wrapper over two dual Ss. Requires Sessioned version of  Requires Spawns a remote session. Both S arguments are spawned remote. Returns the  of both spawned processes.'The arguments are described as follows:7NodeId: The node identifier of the node that the first S should be spawned to.8NodeId: The node identifier of the node that the second S should be spawned to.CClosure (SpawnSession () ()): A closure of a wrapper over two dual Ss. Requires Sessioned version of SpawnRRSession Requires  None      !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFG !"#$%&'()*+,-./0123456789:;<=>?@ABCDNORPQSTUVWXdefstuvwxyz{|}~STUNOPQRVWXdefuvstwxyz{|}~01./,-+*)23456789:$%&'( !"#;<=>?@ABCDNone,-FVH !"#$%&'()*+,-../0123456789:;<<==>>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[[\]^__`abcdefghijklmnopqrstuvwxyz{|} ~ ~          !"#$%&'()*+,-./01234567889:;<=>?@ABCDEFGHIJKLMNOPQRSTUVW5sessiontypes-distributed-0.1.1-HH0mgrzoTmK2zPfWa2CdDR%Control.Distributed.Session.Visualize!Control.Distributed.Session.Debug%Control.Distributed.Session.STChannel#Control.Distributed.Session.Session%Control.Distributed.Session.Normalize'Control.Distributed.Session.Interactive Control.Distributed.Session.Eval%Control.Distributed.Session.Exception#Control.Distributed.Session.Closure"Control.Distributed.Session.Lifted!Control.Distributed.Session.Spawn spawnChannelControl.Distributed.Session)sessiontypes-0.1.2-EPuYkW3efjNJPm7JyD9lUmControl.SessionTypes.Visualize visualizeP visualizeControl.SessionTypes.DebugS_EpsS_VarS_WeakenS_RecS_Off2S_Off1S_OffSS_OffZS_Sel2S_Sel1S_RecvS_SendStreamO_LiftO_EpsO_WeakenO_VarO_RecO_Off2O_Off1O_OffSO_OffZO_Sel2O_Sel1O_RecvO_SendOutput STChannelT runSTChannelTSTRecrecChanwkChanvarChanSTSplitsel1Chansel2Chanoff1Chanoff2ChanUTChanSTChanBiSTChan STReceivePort STSendPortMessage newSTChan newSTChanBi newUTChantoSTChan toSTChanBi sendProxy recvProxy sendSTChan recvSTChan sendSTChanM recvSTChanM sel1ChanM sel2ChanM off1ChanM off2ChanMrecChanMwkChanMvarChanMepsChanM$fBinaryMessage$fSTSplitSTReceivePort$fSTSplitSTSendPort$fSTRecSTReceivePort$fSTRecSTSendPort$fIxMonadTProdSTChannelTm$fIxMonadProdSTChannelT$fIxApplicativeProdSTChannelT$fIxFunctorProdSTChannelT SessionInfoothPidothNodeutchanSession runSessionC runSessionliftPliftST$fIxMonadIOCapSession$fIxMonadReaderCapMaybeSession$fMonadSessionSession$fIxMonadCapSession$fIxApplicativeCapSession$fIxFunctorCapSession normalizeelimRecflatten interactiveinteractiveStep evalSession evalSessionEqevalSessionEq'$fIxMonadMaskCapSessions$fIxMonadCatchCapSessions$fIxMonadThrowCapSessionsrunrunAll runSinglerunPrunAllP runSinglePrunMrunAllM runSingleM SessionWrap SpawnSessionremoteSessionStaticremoteSessionClosureremoteSessionStatic'remoteSessionClosure'spawnChannelStaticspawnChannelClosureevalLocalSessionremoteSpawnSessionStaticremoteSpawnSessionClosureremoteSpawnSessionStatic'remoteSpawnSessionClosure'rrSpawnSessionSendStaticrrSpawnSessionSendClosurerrSpawnSessionExpectStaticrrSpawnSessionExpectClosuresessionRemoteTableutsendusendexpect expectTimeoutnewChansendChan receiveChanreceiveChanTimeoutmergePortsBiased mergePortsRR unsafeSendunsafeSendChan unsafeNSendunsafeNSendRemote receiveWaitreceiveTimeout unwrapMessage handleMessagehandleMessagePhandleMessageIfhandleMessageIfPhandleMessage_handleMessageP_handleMessageIf_handleMessageIfP_forwarduforwarddelegaterelayproxyproxyPspawnspawnPcallcallP terminatediekillexit catchExit catchExitP catchesExit catchesExitP getSelfPid getSelfNode getOthPid getOthNodegetProcessInfo getNodeStatslinklinkNodeunlink unlinkNodemonitor monitorNode monitorPort unmonitor withMonitor withMonitorP withMonitor_ withMonitorP_unStatic unClosuresayregister unregisterwhereisnsendregisterRemoteAsyncreregisterRemoteAsyncwhereisRemoteAsync nsendRemote spawnAsync spawnAsyncPspawnSupervisedspawnSupervisedP spawnLink spawnLinkP spawnMonitor spawnMonitorP spawnChannelP spawnLocal spawnLocalPspawnChannelLocalspawnChannelLocalP callLocal callLocalP reconnect reconnectPortcallLocalSessionPcallLocalSessioncallRemoteSessionPcallRemoteSessioncallRemoteSessionP'callRemoteSession'spawnLLSessionPspawnLLSessionspawnLRSessionPspawnLRSessionspawnRRSessionPspawnRRSession0distributed-process-0.7.3-BSRnTtw4F0l9QL6MhGWuQO*Control.Distributed.Process.Internal.Types ProcessIdNodeIdProcessbaseGHC.BaseMaybeControl.SessionTypes.STTermSTTermControl.SessionTypes.TypesRWkGHC.Listhead(Control.Distributed.Process.Serializable SerializableSerializableDictrrSpawnSessionSend inferIdentityLiftSendRecvSel1Sel2OffZOffSRecWeakenVarRet!Control.SessionTypes.MonadSessioneps0var0weaken0recurse0 recurseFix<&><&offerselN4selN3selN2selN1selNempty0empty MonadSessionsendrecvsel1sel2offZoffSrecurseweakenvarepsSelectselSTV:?>:!>SelOffEpsCapGetSTGetCtxDualDualSTMapDual RemoveSend RemoveSendST MapRemoveSend RemoveRecv MapRemoveRecv RemoveRecvST HasConstraintMapHasConstraintHasConstraintSTHasConstraints IfThenElseNotOrProd:*:LeftRightNatSZRefRefZRefS TypeEqListAppend