diff options
Diffstat (limited to 'stdlib/source/library/lux/target/jvm/bytecode.lux')
-rw-r--r-- | stdlib/source/library/lux/target/jvm/bytecode.lux | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/stdlib/source/library/lux/target/jvm/bytecode.lux b/stdlib/source/library/lux/target/jvm/bytecode.lux index 97871977f..d7a29db73 100644 --- a/stdlib/source/library/lux/target/jvm/bytecode.lux +++ b/stdlib/source/library/lux/target/jvm/bytecode.lux @@ -207,6 +207,14 @@ {.#None} (in []) {.#Some _} it))) +(def: .public (when_acknowledged @ it) + (-> Label (Bytecode Any) (Bytecode Any)) + (do ..monad + [?@ (..acknowledged? @)] + (.case ?@ + {.#None} (in []) + {.#Some _} it))) + (def: .public failure (-> Text Bytecode) (|>> {try.#Failure} function.constant)) |