aboutsummaryrefslogtreecommitdiff
path: root/stdlib/source/test/lux/meta/compiler/language/lux/phase/translation/jvm/function.lux
diff options
context:
space:
mode:
Diffstat (limited to 'stdlib/source/test/lux/meta/compiler/language/lux/phase/translation/jvm/function.lux')
-rw-r--r--stdlib/source/test/lux/meta/compiler/language/lux/phase/translation/jvm/function.lux30
1 files changed, 17 insertions, 13 deletions
diff --git a/stdlib/source/test/lux/meta/compiler/language/lux/phase/translation/jvm/function.lux b/stdlib/source/test/lux/meta/compiler/language/lux/phase/translation/jvm/function.lux
index 81cfb675e..906c23a71 100644
--- a/stdlib/source/test/lux/meta/compiler/language/lux/phase/translation/jvm/function.lux
+++ b/stdlib/source/test/lux/meta/compiler/language/lux/phase/translation/jvm/function.lux
@@ -28,6 +28,9 @@
["_" property (.only Test)]]]]
[\\library
["[0]" / (.only)
+ [field
+ [constant
+ ["[0]" arity]]]
["[0]" // (.only)
["[0]" host]
["[0]" runtime]
@@ -58,11 +61,10 @@
.let [extender (is extension.Extender
(function (_ _)
(undefined)))
- phase (//.translate extender complexT.lux)
- @ [module 0 0]
- $unit [(-- 0) (-- 0)]]
+ next (//.translate extender complexT.lux)
+ @ [module 0 0]]
- arity (of ! each (|>> (n.% 16) (n.+ 2)) random.nat)
+ arity (of ! each (|>> (n.% (-- arity.maximum)) (n.+ 2)) random.nat)
inner_arity (of ! each (|>> (n.% arity) (n.+ 1)) random.nat)])
(all _.and
(_.coverage [/.abstraction]
@@ -75,11 +77,11 @@
(<| (phase.result state)
(do phase.monad
[_ (translation.set_buffer translation.empty_buffer)
- it (/.abstraction phase archive
+ it (/.abstraction next archive
[(list) 1 (synthesis.i64 @ expected_i64)])]
(in (|> it
[{.#None}]
- (of host evaluate $unit)
+ (of host evaluate)
(try#each (|>> (as (-> [] I64))
(function.on [])
(i64#= expected_i64)))
@@ -96,12 +98,12 @@
(<| (phase.result state)
(do phase.monad
[_ (translation.set_buffer translation.empty_buffer)
- it (/.apply phase archive
+ it (/.apply next archive
[(synthesis.function/abstraction @ [(list) arity (synthesis.i64 @ expected_i64)])
(list.repeated arity (synthesis.bit @ expected_bit))])]
(in (|> it
[{.#None}]
- (of host evaluate $unit)
+ (of host evaluate)
(try#each (|>> (as I64)
(i64#= expected_i64)))
(try.else false))))))
@@ -130,13 +132,15 @@
outer_application (is synthesis.Term
(<| (synthesis.function/apply @)
[outer_abstraction
- (list.repeated outer_arity (synthesis.bit @ expected_bit))]))]
- it (/.apply phase archive
- [outer_application
- (list.repeated inner_arity (synthesis.bit @ expected_bit))])]
+ (list.repeated outer_arity (synthesis.bit @ expected_bit))]))
+ inner_application (is synthesis.Term
+ (<| (synthesis.function/apply @)
+ [outer_application
+ (list.repeated inner_arity (synthesis.bit @ expected_bit))]))]
+ it (next archive inner_application)]
(in (|> it
[{.#None}]
- (of host evaluate $unit)
+ (of host evaluate)
(try#each (|>> (as I64)
(i64#= expected_i64)))
(try.else false))))))