diff options
Diffstat (limited to '')
-rw-r--r-- | stdlib/source/library/lux/target/jvm/bytecode/environment.lux | 52 |
1 files changed, 26 insertions, 26 deletions
diff --git a/stdlib/source/library/lux/target/jvm/bytecode/environment.lux b/stdlib/source/library/lux/target/jvm/bytecode/environment.lux index 3e6f60b30..222bd7c0e 100644 --- a/stdlib/source/library/lux/target/jvm/bytecode/environment.lux +++ b/stdlib/source/library/lux/target/jvm/bytecode/environment.lux @@ -1,21 +1,21 @@ (.using - [library - [lux {"-" Type static} - [abstract - [monad {"+" do}] - [monoid {"+" Monoid}]] - [control - ["[0]" try {"+" Try}] - ["[0]" exception {"+" exception:}]]]] - [/ - ["/[0]" limit {"+" Limit} - ["/[0]" stack {"+" Stack}] - ["/[0]" registry {"+" Registry}]] - [/// - [encoding - [unsigned {"+" U2}]] - [type {"+" Type} - [category {"+" Method}]]]]) + [library + [lux {"-" Type static has} + [abstract + [monad {"+" do}] + [monoid {"+" Monoid}]] + [control + ["[0]" try {"+" Try}] + ["[0]" exception {"+" exception:}]]]] + [/ + ["/[0]" limit {"+" Limit} + ["/[0]" stack {"+" Stack}] + ["/[0]" registry {"+" Registry}]] + [/// + [encoding + [unsigned {"+" U2}]] + [type {"+" Type} + [category {"+" Method}]]]]) (type: .public Environment (Record @@ -53,7 +53,7 @@ (def: .public (stack environment) (-> Environment (Try Stack)) - (case (value@ ..#stack environment) + (case (the ..#stack environment) {.#Some stack} {try.#Success stack} @@ -62,7 +62,7 @@ (def: .public discontinue (-> Environment Environment) - (with@ ..#stack {.#None})) + (.has ..#stack {.#None})) (exception: .public (mismatched_stacks [expected Stack actual Stack]) @@ -72,14 +72,14 @@ (def: .public (continue expected environment) (-> Stack Environment (Try [Stack Environment])) - (case (value@ ..#stack environment) + (case (the ..#stack environment) {.#Some actual} (if (# /stack.equivalence = expected actual) {try.#Success [actual environment]} (exception.except ..mismatched_stacks [expected actual])) {.#None} - {try.#Success [expected (with@ ..#stack {.#Some expected} environment)]})) + {try.#Success [expected (.has ..#stack {.#Some expected} environment)]})) (def: .public (consumes amount) (-> U2 Condition) @@ -89,7 +89,7 @@ (do try.monad [previous (..stack environment) current (/stack.pop amount previous)] - (in (with@ ..#stack {.#Some current} environment))))) + (in (.has ..#stack {.#Some current} environment))))) (def: .public (produces amount) (-> U2 Condition) @@ -98,13 +98,13 @@ [previous (..stack environment) current (/stack.push amount previous) .let [limit (|> environment - (value@ [..#limit /limit.#stack]) + (the [..#limit /limit.#stack]) (/stack.max current))]] (in (|> environment - (with@ ..#stack {.#Some current}) - (with@ [..#limit /limit.#stack] limit)))))) + (.has ..#stack {.#Some current}) + (.has [..#limit /limit.#stack] limit)))))) (def: .public (has registry) (-> Registry Condition) - (|>> (revised@ [..#limit /limit.#registry] (/registry.has registry)) + (|>> (revised [..#limit /limit.#registry] (/registry.has registry)) {try.#Success})) |