aboutsummaryrefslogtreecommitdiff
path: root/stdlib/source/library/lux/target/jvm/bytecode.lux
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--stdlib/source/library/lux/target/jvm/bytecode.lux77
1 files changed, 39 insertions, 38 deletions
diff --git a/stdlib/source/library/lux/target/jvm/bytecode.lux b/stdlib/source/library/lux/target/jvm/bytecode.lux
index 7925c5c24..e838ed77d 100644
--- a/stdlib/source/library/lux/target/jvm/bytecode.lux
+++ b/stdlib/source/library/lux/target/jvm/bytecode.lux
@@ -110,11 +110,11 @@
(try|in [(at sequence.monoid composite left_exceptions right_exceptions)
(_#composite left_instruction right_instruction)])))))
-(implementation: relative_monoid
+(def: relative_monoid
(Monoid Relative)
-
- (def: identity ..relative#identity)
- (def: composite ..relative#composite))
+ (implementation
+ (def: identity ..relative#identity)
+ (def: composite ..relative#composite)))
(type: .public (Bytecode a)
(+State Try [Pool Environment Tracker] (Writer Relative a)))
@@ -205,42 +205,43 @@
environment))
<success>))))))
-(implementation: .public functor
+(def: .public functor
(Functor Bytecode)
- (def: (each $ it)
- (function (_ state)
- (case (it state)
- {try.#Success [state' [relative it]]}
- {try.#Success [state' [relative ($ it)]]}
-
- ... {try.#Failure error}
- failure
- (as_expected failure)))))
-
-(implementation: .public monad
+ (implementation
+ (def: (each $ it)
+ (function (_ state)
+ (case (it state)
+ {try.#Success [state' [relative it]]}
+ {try.#Success [state' [relative ($ it)]]}
+
+ ... {try.#Failure error}
+ failure
+ (as_expected failure))))))
+
+(def: .public monad
(Monad Bytecode)
-
- (def: functor ..functor)
-
- (def: (in it)
- (function (_ state)
- {try.#Success [state [relative#identity it]]}))
-
- (def: (conjoint ^^it)
- (function (_ state)
- (case (^^it state)
- {try.#Success [state' [left ^it]]}
- (case (^it state')
- {try.#Success [state'' [right it]]}
- {try.#Success [state'' [(relative#composite left right) it]]}
-
- ... {try.#Failure error}
- failure
- (as_expected failure))
-
- ... {try.#Failure error}
- failure
- (as_expected failure)))))
+ (implementation
+ (def: functor ..functor)
+
+ (def: (in it)
+ (function (_ state)
+ {try.#Success [state [relative#identity it]]}))
+
+ (def: (conjoint ^^it)
+ (function (_ state)
+ (case (^^it state)
+ {try.#Success [state' [left ^it]]}
+ (case (^it state')
+ {try.#Success [state'' [right it]]}
+ {try.#Success [state'' [(relative#composite left right) it]]}
+
+ ... {try.#Failure error}
+ failure
+ (as_expected failure))
+
+ ... {try.#Failure error}
+ failure
+ (as_expected failure))))))
(def: .public (when_continuous it)
(-> (Bytecode Any) (Bytecode Any))