def on_fail
import cswap-bend-cli@0.1.0.0/act.bend as Actimport Base
import cswap-bend-cli@0.1.0.0/fs.bend as Fs
58# Run `cleanup` only when `act` failed, and still answer the failure.
59def on_fail(-A: Type, act: of(A), cleanup: of(Unit)) -> of(A):
60 IO.bind(Fs.Res(A), Fs.Res(A), act, r => on_fail2(A, r, cleanup))