It would be nice to allow defining first class handlers by providing handling function. We agreed (more-less) on the following syntax:
handlerfn
<def₁> ... <defₙ>
in
<expr_cap>
return <pat_r> => <expr_r>
finally <pat_f> => <expr_f>
end
The return and finally clauses are optional. The meaning of such a code is a first class handler that realizes the following handling function:
fn run =>
let <pat_f> =
<def₁> ... <defₙ>
let <pat_r> = run <expr_cap>
in
<expr_r>
in
<expr_f>
It would be nice to allow defining first class handlers by providing handling function. We agreed (more-less) on the following syntax:
The return and finally clauses are optional. The meaning of such a code is a first class handler that realizes the following handling function: