aboutsummaryrefslogtreecommitdiff
path: root/stdlib/source/test
diff options
context:
space:
mode:
Diffstat (limited to 'stdlib/source/test')
-rw-r--r--stdlib/source/test/lux.lux2
-rw-r--r--stdlib/source/test/lux/abstract/predicate.lux4
-rw-r--r--stdlib/source/test/lux/control/function/memo.lux10
-rw-r--r--stdlib/source/test/lux/control/function/mixin.lux28
-rw-r--r--stdlib/source/test/lux/control/parser/binary.lux8
-rw-r--r--stdlib/source/test/lux/data/binary.lux2
-rw-r--r--stdlib/source/test/lux/data/collection/array.lux2
-rw-r--r--stdlib/source/test/lux/data/format/json.lux6
-rw-r--r--stdlib/source/test/lux/target/jvm.lux2
-rw-r--r--stdlib/source/test/lux/tool/compiler/language/lux/phase/synthesis/function.lux6
-rw-r--r--stdlib/source/test/lux/tool/compiler/language/lux/phase/synthesis/loop.lux6
-rw-r--r--stdlib/source/test/lux/tool/compiler/language/lux/phase/synthesis/variable.lux8
-rw-r--r--stdlib/source/test/lux/type.lux10
-rw-r--r--stdlib/source/test/lux/type/check.lux4
14 files changed, 49 insertions, 49 deletions
diff --git a/stdlib/source/test/lux.lux b/stdlib/source/test/lux.lux
index dc23cd309..867fe04ed 100644
--- a/stdlib/source/test/lux.lux
+++ b/stdlib/source/test/lux.lux
@@ -1009,7 +1009,7 @@
(/.loop [counter 0
value 0]
(if (n.< iterations counter)
- (recur (++ counter) (n.+ factor value))
+ (again (++ counter) (n.+ factor value))
value)))))
(do random.monad
[pre random.nat
diff --git a/stdlib/source/test/lux/abstract/predicate.lux b/stdlib/source/test/lux/abstract/predicate.lux
index 09982b560..f804aa6db 100644
--- a/stdlib/source/test/lux/abstract/predicate.lux
+++ b/stdlib/source/test/lux/abstract/predicate.lux
@@ -77,7 +77,7 @@
(_.cover [/.rec]
(let [even? (multiple? 2)
any_even? (: (/.Predicate (List Nat))
- (/.rec (function (_ recur)
+ (/.rec (function (_ again)
(function (_ values)
(case values
{.#End}
@@ -85,7 +85,7 @@
{.#Item head tail}
(or (even? head)
- (recur tail)))))))]
+ (again tail)))))))]
(bit#= (list.any? even? samples)
(any_even? samples))))
)))
diff --git a/stdlib/source/test/lux/control/function/memo.lux b/stdlib/source/test/lux/control/function/memo.lux
index b1b559346..6ad5b243a 100644
--- a/stdlib/source/test/lux/control/function/memo.lux
+++ b/stdlib/source/test/lux/control/function/memo.lux
@@ -25,14 +25,14 @@
["/[1]" // "_"
["[1]" mixin]]]])
-(def: (fibonacci recur input)
+(def: (fibonacci again input)
(/.Memo Nat Nat)
(case input
0 (state#in 0)
1 (state#in 1)
_ (do state.monad
- [output_1 (recur (n.- 1 input))
- output_2 (recur (n.- 2 input))]
+ [output_1 (again (n.- 1 input))
+ output_2 (again (n.- 2 input))]
(in (n.+ output_1 output_2)))))
(def: (time function input)
@@ -104,11 +104,11 @@
(let [memo (<| //.fixed
(//.mixed /.memoization)
(: (//.Mixin Nat (State (Dictionary Nat Nat) Nat))
- (function (factorial delegate recur input)
+ (function (factorial delegate again input)
(case input
(^or 0 1) (# state.monad in 1)
_ (do state.monad
- [output' (recur (-- input))]
+ [output' (again (-- input))]
(in (n.* input output')))))))
expected (|> (list.indices input)
(list#each ++)
diff --git a/stdlib/source/test/lux/control/function/mixin.lux b/stdlib/source/test/lux/control/function/mixin.lux
index fa1c245a3..4fc898500 100644
--- a/stdlib/source/test/lux/control/function/mixin.lux
+++ b/stdlib/source/test/lux/control/function/mixin.lux
@@ -36,7 +36,7 @@
generator (: (Random (/.Mixin Nat Nat))
(do !
[output random.nat]
- (in (function (_ delegate recur input)
+ (in (function (_ delegate again input)
output))))
expected (|> (list.indices input)
(list#each ++)
@@ -49,27 +49,27 @@
(_.cover [/.fixed]
(let [factorial (/.fixed
- (function (_ delegate recur input)
+ (function (_ delegate again input)
(case input
(^or 0 1) 1
- _ (n.* input (recur (-- input))))))]
+ _ (n.* input (again (-- input))))))]
(n.= expected
(factorial input))))
(_.cover [/.mixed]
(let [bottom (: (/.Mixin Nat Nat)
- (function (_ delegate recur input)
+ (function (_ delegate again input)
(case input
(^or 0 1) 1
_ (delegate input))))
multiplication (: (/.Mixin Nat Nat)
- (function (_ delegate recur input)
- (n.* input (recur (-- input)))))
+ (function (_ delegate again input)
+ (n.* input (again (-- input)))))
factorial (/.fixed (/.mixed bottom multiplication))]
(n.= expected
(factorial input))))
(_.cover [/.nothing]
(let [loop (: (/.Mixin Nat Nat)
- (function (_ delegate recur input)
+ (function (_ delegate again input)
(case input
(^or 0 1) 1
_ (n.* input (delegate (-- input))))))
@@ -81,7 +81,7 @@
(right input)))))
(_.cover [/.advice]
(let [bottom (: (/.Mixin Nat Nat)
- (function (_ delegate recur input)
+ (function (_ delegate again input)
1))
bottom? (: (Predicate Nat)
(function (_ input)
@@ -89,8 +89,8 @@
(^or 0 1) true
_ false)))
multiplication (: (/.Mixin Nat Nat)
- (function (_ delegate recur input)
- (n.* input (recur (-- input)))))
+ (function (_ delegate again input)
+ (n.* input (again (-- input)))))
factorial (/.fixed (/.mixed (/.advice bottom? bottom)
multiplication))]
(n.= expected
@@ -101,7 +101,7 @@
(function (_ state)
[shift []])))
meld (: (/.Mixin Nat (State Nat Nat))
- (function (_ delegate recur input)
+ (function (_ delegate again input)
(function (_ state)
[state (n.+ state input)])))
function (/.fixed (/.mixed (/.before state.monad implant)
@@ -114,7 +114,7 @@
(function (_ state)
[shift []])))
meld (: (/.Mixin Nat (State Nat Nat))
- (function (_ delegate recur input)
+ (function (_ delegate again input)
(function (_ state)
[state (n.+ state input)])))
function (/.fixed (/.mixed (/.after state.monad implant)
@@ -126,10 +126,10 @@
(_.cover [/.of_recursive]
(let [factorial (/.fixed
(/.of_recursive
- (function (_ recur input)
+ (function (_ again input)
(case input
(^or 0 1) 1
- _ (n.* input (recur (-- input)))))))]
+ _ (n.* input (again (-- input)))))))]
(n.= expected
(factorial input)))))
)))
diff --git a/stdlib/source/test/lux/control/parser/binary.lux b/stdlib/source/test/lux/control/parser/binary.lux
index 3bf3363c9..e878f916f 100644
--- a/stdlib/source/test/lux/control/parser/binary.lux
+++ b/stdlib/source/test/lux/control/parser/binary.lux
@@ -91,10 +91,10 @@
(def: random_code
(Random Code)
(random.rec
- (function (_ recur)
+ (function (_ again)
(let [random_sequence (do [! random.monad]
[size (# ! each (n.% 2) random.nat)]
- (random.list size recur))]
+ (random.list size again))]
($_ random.and
..random_location
(: (Random (Code' (Ann Location)))
@@ -306,10 +306,10 @@
(format.or format.any))))
(/.result (: (/.Parser (List Nat))
(/.rec
- (function (_ recur)
+ (function (_ again)
(/.or /.any
(<>.and /.nat
- recur))))))
+ again))))))
(!expect (^multi {try.#Success actual}
(# (list.equivalence n.equivalence) =
expected
diff --git a/stdlib/source/test/lux/data/binary.lux b/stdlib/source/test/lux/data/binary.lux
index 030404d54..36f0a8020 100644
--- a/stdlib/source/test/lux/data/binary.lux
+++ b/stdlib/source/test/lux/data/binary.lux
@@ -39,7 +39,7 @@
(do random.monad
[byte random.nat]
(exec (try.trusted (/.write/8! idx byte output))
- (recur (++ idx))))
+ (again (++ idx))))
(# random.monad in output)))))
(def: (throws? exception try)
diff --git a/stdlib/source/test/lux/data/collection/array.lux b/stdlib/source/test/lux/data/collection/array.lux
index 95cfc0176..7ae1c7501 100644
--- a/stdlib/source/test/lux/data/collection/array.lux
+++ b/stdlib/source/test/lux/data/collection/array.lux
@@ -175,7 +175,7 @@
(/.empty size))
idx 0]
(if (n.< occupancy idx)
- (recur (/.write! idx expected output)
+ (again (/.write! idx expected output)
(++ idx))
output))]
(and (n.= occupancy (/.occupancy the_array))
diff --git a/stdlib/source/test/lux/data/format/json.lux b/stdlib/source/test/lux/data/format/json.lux
index f3d3b9b93..440ab1f07 100644
--- a/stdlib/source/test/lux/data/format/json.lux
+++ b/stdlib/source/test/lux/data/format/json.lux
@@ -34,7 +34,7 @@
(def: .public random
(Random /.JSON)
(random.rec
- (function (_ recur)
+ (function (_ again)
(do [! random.monad]
[size (# ! each (n.% 2) random.nat)]
($_ random.or
@@ -42,8 +42,8 @@
random.bit
random.safe_frac
(random.unicode size)
- (random.row size recur)
- (random.dictionary text.hash size (random.unicode size) recur)
+ (random.row size again)
+ (random.dictionary text.hash size (random.unicode size) again)
)))))
(syntax: (boolean [])
diff --git a/stdlib/source/test/lux/target/jvm.lux b/stdlib/source/test/lux/target/jvm.lux
index 2508ae7fc..bdfc318a7 100644
--- a/stdlib/source/test/lux/target/jvm.lux
+++ b/stdlib/source/test/lux/target/jvm.lux
@@ -1026,7 +1026,7 @@
..$Object)]
(case dimensions
0 type
- _ (recur (-- dimensions) (/type.array type))))]]
+ _ (again (-- dimensions) (/type.array type))))]]
(<| (_.lifted "MULTIANEWARRAY")
(..bytecode (|>> (:as Nat) (n.= sizesH)))
(do [! /.monad]
diff --git a/stdlib/source/test/lux/tool/compiler/language/lux/phase/synthesis/function.lux b/stdlib/source/test/lux/tool/compiler/language/lux/phase/synthesis/function.lux
index 20284ae47..ed8e31e3f 100644
--- a/stdlib/source/test/lux/tool/compiler/language/lux/phase/synthesis/function.lux
+++ b/stdlib/source/test/lux/tool/compiler/language/lux/phase/synthesis/function.lux
@@ -303,12 +303,12 @@
(random.either (..random_if random_value output?)
(..random_get random_value output?))))
-(def: (random_recur arity random_value output?)
+(def: (random_again arity random_value output?)
(-> Arity Scenario Scenario)
(do [! random.monad]
[resets (random.list arity (random_value false))]
(in [true
- (synthesis.loop/recur (list#each (|>> product.right product.left) resets))
+ (synthesis.loop/again (list#each (|>> product.right product.left) resets))
(analysis.apply [{analysis.#Reference (case arity
1 (reference.local 0)
_ (reference.foreign 0))}
@@ -334,7 +334,7 @@
(-> Arity Scenario Scenario)
(if output?
($_ random.either
- (..random_recur arity random_value output?)
+ (..random_again arity random_value output?)
(..random_scope arity output?)
)
(..random_scope arity output?)))
diff --git a/stdlib/source/test/lux/tool/compiler/language/lux/phase/synthesis/loop.lux b/stdlib/source/test/lux/tool/compiler/language/lux/phase/synthesis/loop.lux
index bbeae5033..7cd0ea0ad 100644
--- a/stdlib/source/test/lux/tool/compiler/language/lux/phase/synthesis/loop.lux
+++ b/stdlib/source/test/lux/tool/compiler/language/lux/phase/synthesis/loop.lux
@@ -110,7 +110,7 @@
(def: path
(Scenario Path)
(let [pattern (: (Scenario Path)
- (.function (recur offset arity next)
+ (.function (again offset arity next)
(`` ($_ random.either
(random#in [next
[//.path/pop
@@ -144,14 +144,14 @@
(//.path/bind next)]])
))))
sequential (: (Scenario Path)
- (.function (recur offset arity next)
+ (.function (again offset arity next)
(do random.monad
[[next [patternE patternA]] (pattern offset arity next)
[next [bodyE bodyA]] (..reference offset arity next)]
(in [next
[(//.path/seq patternE (//.path/then bodyE))
(//.path/seq patternA (//.path/then bodyA))]]))))]
- (.function (recur offset arity next)
+ (.function (again offset arity next)
(do random.monad
[[next [leftE leftA]] (sequential offset arity next)
[next [rightE rightA]] (sequential offset arity next)]
diff --git a/stdlib/source/test/lux/tool/compiler/language/lux/phase/synthesis/variable.lux b/stdlib/source/test/lux/tool/compiler/language/lux/phase/synthesis/variable.lux
index 81c088aa2..636c30003 100644
--- a/stdlib/source/test/lux/tool/compiler/language/lux/phase/synthesis/variable.lux
+++ b/stdlib/source/test/lux/tool/compiler/language/lux/phase/synthesis/variable.lux
@@ -254,19 +254,19 @@
(in [(synthesis.loop/scope [real_start (list#each product.left inits) expected_iteration])
(synthesis.loop/scope [fake_start (list#each product.right inits) actual_iteration])])))
-(def: (recur_scenario scenario context)
+(def: (again_scenario scenario context)
(-> (Scenario Synthesis) (Scenario Synthesis))
(do [! random.monad]
[_ (in [])
resets (random.list ..scope_arity (scenario context))]
- (in [(synthesis.loop/recur (list#each product.left resets))
- (synthesis.loop/recur (list#each product.right resets))])))
+ (in [(synthesis.loop/again (list#each product.left resets))
+ (synthesis.loop/again (list#each product.right resets))])))
(def: (loop_scenario scenario context)
(-> (Scenario Synthesis) (Scenario Synthesis))
($_ random.either
(..scope_scenario scenario context)
- (..recur_scenario scenario context)
+ (..again_scenario scenario context)
))
(def: (abstraction_scenario scenario context)
diff --git a/stdlib/source/test/lux/type.lux b/stdlib/source/test/lux/type.lux
index 4033af819..7f2386dc3 100644
--- a/stdlib/source/test/lux/type.lux
+++ b/stdlib/source/test/lux/type.lux
@@ -48,13 +48,13 @@
(def: (random' parameters)
(-> Nat (Random Type))
(random.rec
- (function (_ recur)
- (let [pairG (random.and recur recur)
+ (function (_ again)
+ (let [pairG (random.and again again)
un_parameterized (: (Random Type)
($_ random.either
- (random#each (|>> {.#Primitive}) (random.and ..short (random.list 0 recur)))
- (random#each (|>> {.#Primitive}) (random.and ..short (random.list 1 recur)))
- (random#each (|>> {.#Primitive}) (random.and ..short (random.list 2 recur)))
+ (random#each (|>> {.#Primitive}) (random.and ..short (random.list 0 again)))
+ (random#each (|>> {.#Primitive}) (random.and ..short (random.list 1 again)))
+ (random#each (|>> {.#Primitive}) (random.and ..short (random.list 2 again)))
(random#each (|>> {.#Sum}) pairG)
(random#each (|>> {.#Product}) pairG)
(random#each (|>> {.#Function}) pairG)
diff --git a/stdlib/source/test/lux/type/check.lux b/stdlib/source/test/lux/type/check.lux
index cd4fc5426..2936e7117 100644
--- a/stdlib/source/test/lux/type/check.lux
+++ b/stdlib/source/test/lux/type/check.lux
@@ -41,8 +41,8 @@
(def: (type' num_vars)
(-> Nat (Random Type))
(random.rec
- (function (_ recur)
- (let [pairG (random.and recur recur)
+ (function (_ again)
+ (let [pairG (random.and again again)
quantifiedG (random.and (random#in (list)) (type' (++ num_vars)))
random_pair (random.either (random.either (random#each (|>> {.#Sum}) pairG)
(random#each (|>> {.#Product}) pairG))