Open laumann opened 6 years ago
Maybe more readable if labels were supported:
proto!{Atm, Client,
?<Id>,
+[
act. &[
deposit: ?<u64>, !<u64>, act;
withdraw: ?<u64>, +[ok: act; err: act];
balance: !<u64>;
exit: eps
];
eps
]
}
Recursion labels could then be followed by .
and branch labels be followed by :
to separate the two.
Suggestion is to add a macro for writing the session types down.
Something like:
where
?<T>, P
denotesRecv<T, P>
!<T>, P
denotesSend<T, P>
+[A; B; C]
isChoose<A, Choose<B, C>>
&[A; B; C]
isOffer<A, Offer<B, C>>
t: P
should beRec<P>
. Any occurrences oft
inP
should be replaced with an appropriateVar<N>
constructeps
is justEps
The output of
proto!()
is then two type aliases:This should replace the current constructs like this: