aboutsummaryrefslogtreecommitdiff
path: root/stdlib/source/library/lux/target/jvm/bytecode/environment/limit/registry.lux
diff options
context:
space:
mode:
Diffstat (limited to 'stdlib/source/library/lux/target/jvm/bytecode/environment/limit/registry.lux')
-rw-r--r--stdlib/source/library/lux/target/jvm/bytecode/environment/limit/registry.lux96
1 files changed, 47 insertions, 49 deletions
diff --git a/stdlib/source/library/lux/target/jvm/bytecode/environment/limit/registry.lux b/stdlib/source/library/lux/target/jvm/bytecode/environment/limit/registry.lux
index 9a111eb22..13f9343a7 100644
--- a/stdlib/source/library/lux/target/jvm/bytecode/environment/limit/registry.lux
+++ b/stdlib/source/library/lux/target/jvm/bytecode/environment/limit/registry.lux
@@ -29,65 +29,63 @@
(def: wide 2)
(abstract: .public Registry
- {}
-
U2
- (def: .public registry
- (-> U2 Registry)
- (|>> :abstraction))
+ [(def: .public registry
+ (-> U2 Registry)
+ (|>> :abstraction))
- (def: (minimal type)
- (-> (Type Method) Nat)
- (let [[type_variables inputs output exceptions] (/////type/parser.method type)]
- (|> inputs
- (list\each (function (_ input)
- (if (or (same? /////type.long input)
- (same? /////type.double input))
- ..wide
- ..normal)))
- (list\mix n.+ 0))))
+ (def: (minimal type)
+ (-> (Type Method) Nat)
+ (let [[type_variables inputs output exceptions] (/////type/parser.method type)]
+ (|> inputs
+ (list\each (function (_ input)
+ (if (or (same? /////type.long input)
+ (same? /////type.double input))
+ ..wide
+ ..normal)))
+ (list\mix n.+ 0))))
- (template [<start> <name>]
- [(def: .public <name>
- (-> (Type Method) (Try Registry))
- (|>> ..minimal
- (n.+ <start>)
- /////unsigned.u2
- (try\each ..registry)))]
+ (template [<start> <name>]
+ [(def: .public <name>
+ (-> (Type Method) (Try Registry))
+ (|>> ..minimal
+ (n.+ <start>)
+ /////unsigned.u2
+ (try\each ..registry)))]
- [0 static]
- [1 virtual]
- )
+ [0 static]
+ [1 virtual]
+ )
- (def: .public equivalence
- (Equivalence Registry)
- (\ equivalence.functor each
- (|>> :representation)
- /////unsigned.equivalence))
+ (def: .public equivalence
+ (Equivalence Registry)
+ (\ equivalence.functor each
+ (|>> :representation)
+ /////unsigned.equivalence))
- (def: .public writer
- (Writer Registry)
- (|>> :representation /////unsigned.writer/2))
+ (def: .public writer
+ (Writer Registry)
+ (|>> :representation /////unsigned.writer/2))
- (def: .public (has needed)
- (-> Registry Registry Registry)
- (|>> :representation
- (/////unsigned.max/2 (:representation needed))
- :abstraction))
+ (def: .public (has needed)
+ (-> Registry Registry Registry)
+ (|>> :representation
+ (/////unsigned.max/2 (:representation needed))
+ :abstraction))
- (template [<name> <extra>]
- [(def: .public <name>
- (-> Register Registry)
- (let [extra (|> <extra> /////unsigned.u2 try.trusted)]
- (|>> /////unsigned.lifted/2
- (/////unsigned.+/2 extra)
- try.trusted
- :abstraction)))]
+ (template [<name> <extra>]
+ [(def: .public <name>
+ (-> Register Registry)
+ (let [extra (|> <extra> /////unsigned.u2 try.trusted)]
+ (|>> /////unsigned.lifted/2
+ (/////unsigned.+/2 extra)
+ try.trusted
+ :abstraction)))]
- [for ..normal]
- [for_wide ..wide]
- )
+ [for ..normal]
+ [for_wide ..wide]
+ )]
)
(def: .public length