You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
if eq(length(M), |nonce|) then
if eq(length(A), |nonce|) then
if eq(length(B), |nonce|) then
case x1
| mA2_enc _ => ()
| mA1_enc x1' =>
(case dec(kA, x1')
| None => ()
| Some resA =>
unpack j1, resA' = resA in
unpack j2, resA'' = resA' in
(case resA''
| mA1 msg1A => ...
| mA2 _ => ...))
Aside from the nested equality checks, we also want better syntax for nested case expressions, and nested unpacks.
Perhaps something like:
(mA1_enc x1') =? x1 in
(Some ResA) =? dec(kA, x1') in
...
where the semantics of =? is to return () if the pattern match fails. (Or, perhaps if we return an option, to return None).
A Rust-style if let operation would work well too.
The text was updated successfully, but these errors were encountered:
Currently, we have code like:
Aside from the nested equality checks, we also want better syntax for nested
case
expressions, and nestedunpack
s.Perhaps something like:
where the semantics of
=?
is to return()
if the pattern match fails. (Or, perhaps if we return an option, to returnNone
).A Rust-style
if let
operation would work well too.The text was updated successfully, but these errors were encountered: