aboutsummaryrefslogtreecommitdiff
path: root/stdlib/source/test/lux/tool/compiler
diff options
context:
space:
mode:
authorEduardo Julian2022-06-12 00:38:20 -0400
committerEduardo Julian2022-06-12 00:38:20 -0400
commitb48ea68a83d01903554c7696c77eedaaf1035680 (patch)
treec342d8094c3158de16526f874ca9624418cd2dd2 /stdlib/source/test/lux/tool/compiler
parent7abf2d0ac55c229a8793bbff31f132596ffcb275 (diff)
De-sigil-ification: suffix : [Part 3]
Diffstat (limited to 'stdlib/source/test/lux/tool/compiler')
-rw-r--r--stdlib/source/test/lux/tool/compiler/language/lux/analysis.lux17
-rw-r--r--stdlib/source/test/lux/tool/compiler/language/lux/analysis/coverage.lux6
-rw-r--r--stdlib/source/test/lux/tool/compiler/language/lux/analysis/inference.lux6
-rw-r--r--stdlib/source/test/lux/tool/compiler/language/lux/analysis/module.lux18
-rw-r--r--stdlib/source/test/lux/tool/compiler/language/lux/analysis/pattern.lux2
-rw-r--r--stdlib/source/test/lux/tool/compiler/language/lux/analysis/scope.lux2
-rw-r--r--stdlib/source/test/lux/tool/compiler/language/lux/phase/analysis.lux12
-rw-r--r--stdlib/source/test/lux/tool/compiler/language/lux/phase/analysis/complex.lux4
-rw-r--r--stdlib/source/test/lux/tool/compiler/language/lux/phase/analysis/simple.lux19
-rw-r--r--stdlib/source/test/lux/tool/compiler/language/lux/phase/extension/analysis/lux.lux2
-rw-r--r--stdlib/source/test/lux/tool/compiler/language/lux/phase/synthesis/case.lux2
-rw-r--r--stdlib/source/test/lux/tool/compiler/language/lux/phase/synthesis/function.lux17
-rw-r--r--stdlib/source/test/lux/tool/compiler/language/lux/phase/synthesis/loop.lux8
-rw-r--r--stdlib/source/test/lux/tool/compiler/language/lux/phase/synthesis/primitive.lux4
-rw-r--r--stdlib/source/test/lux/tool/compiler/language/lux/phase/synthesis/variable.lux19
-rw-r--r--stdlib/source/test/lux/tool/compiler/meta/archive/registry.lux23
-rw-r--r--stdlib/source/test/lux/tool/compiler/meta/cache/module.lux2
-rw-r--r--stdlib/source/test/lux/tool/compiler/meta/cli.lux8
-rw-r--r--stdlib/source/test/lux/tool/compiler/meta/context.lux2
-rw-r--r--stdlib/source/test/lux/tool/compiler/reference.lux2
-rw-r--r--stdlib/source/test/lux/tool/compiler/version.lux2
21 files changed, 91 insertions, 86 deletions
diff --git a/stdlib/source/test/lux/tool/compiler/language/lux/analysis.lux b/stdlib/source/test/lux/tool/compiler/language/lux/analysis.lux
index c8d3a3c6d..407833523 100644
--- a/stdlib/source/test/lux/tool/compiler/language/lux/analysis.lux
+++ b/stdlib/source/test/lux/tool/compiler/language/lux/analysis.lux
@@ -116,7 +116,7 @@
_
false))
- (~~ (template [<tag> <expected>]
+ (~~ (with_template [<tag> <expected>]
[(_.coverage [<tag>]
(case (<tag> <expected>)
(pattern (<tag> actual))
@@ -170,7 +170,7 @@
expected_constant (/symbol.random 1 1)
expected_variable /variable.random]
(`` (all _.and
- (~~ (template [<tag> <expected>]
+ (~~ (with_template [<tag> <expected>]
[(_.coverage [<tag>]
(case (<tag> <expected>)
(pattern (<tag> actual))
@@ -186,13 +186,14 @@
))
))))
-(template: (tagged? <tag> <it>)
- [(case <it>
- {<tag> _}
- true
+(def: tagged?
+ (template (_ <tag> <it>)
+ [(case <it>
+ {<tag> _}
+ true
- _
- false)])
+ _
+ false)]))
(def: test|reification
Test
diff --git a/stdlib/source/test/lux/tool/compiler/language/lux/analysis/coverage.lux b/stdlib/source/test/lux/tool/compiler/language/lux/analysis/coverage.lux
index 21c47404c..14ed1bef3 100644
--- a/stdlib/source/test/lux/tool/compiler/language/lux/analysis/coverage.lux
+++ b/stdlib/source/test/lux/tool/compiler/language/lux/analysis/coverage.lux
@@ -84,7 +84,7 @@
[it random.bit]
(in [{/.#Bit it}
{//pattern.#Simple {//simple.#Bit it}}]))
- (~~ (template [<random> <hash> <coverage> <pattern>]
+ (~~ (with_template [<random> <hash> <coverage> <pattern>]
[(do random.monad
[it <random>]
(in [{<coverage> (set.of_list <hash> (list it))}
@@ -266,7 +266,7 @@
(/.composite {/.#Exhaustive})
(try#each (/#= {/.#Exhaustive}))
(try.else false))
- (~~ (template [<tag> <hash> <value> <next>]
+ (~~ (with_template [<tag> <hash> <value> <next>]
[(|> (/.composite {<tag> (set.of_list <hash> (list <value>))}
{<tag> (set.of_list <hash> (list (|> <value> <next>)))})
(try#each (/#= {<tag> (set.of_list <hash> (list <value> (|> <value> <next>)))}))
@@ -416,7 +416,7 @@
(_.coverage [/.redundancy]
(let [redundant? (..failure? /.redundancy)]
(`` (and (redundant? (/.composite {/.#Exhaustive} {/.#Exhaustive}))
- (~~ (template [<it>]
+ (~~ (with_template [<it>]
[(redundant? (/.composite <it> <it>))
(redundant? (/.composite <it> {/.#Exhaustive}))]
diff --git a/stdlib/source/test/lux/tool/compiler/language/lux/analysis/inference.lux b/stdlib/source/test/lux/tool/compiler/language/lux/analysis/inference.lux
index 86c9c3409..6b7c63309 100644
--- a/stdlib/source/test/lux/tool/compiler/language/lux/analysis/inference.lux
+++ b/stdlib/source/test/lux/tool/compiler/language/lux/analysis/inference.lux
@@ -84,7 +84,7 @@
(def: .public simple_parameter
(Random [Type Code])
(`` (all random.either
- (~~ (template [<type> <random> <code>]
+ (~~ (with_template [<type> <random> <code>]
[(random#each (|>> <code> [<type>]) <random>)]
[.Bit random.bit code.bit]
@@ -270,7 +270,7 @@
(not (variant? (type (Maybe type/0)) 0 #1 term/1)))
only_bottom_conforms_to_tags_outside_of_range!
- (`` (and (~~ (template [<verdict> <term>]
+ (`` (and (~~ (with_template [<verdict> <term>]
[(bit#= <verdict> (variant? variantT arity arbitrary_right? <term>))]
[#0 term/0]
@@ -293,7 +293,7 @@
0 #0 (' []))
existential_types_affect_dependent_cases!
- (`` (and (~~ (template [<verdict> <term>]
+ (`` (and (~~ (with_template [<verdict> <term>]
[(bit#= <verdict> (variant?' (type (Ex (_ a) (Maybe a))) {.#None} 0 #1 <term>))]
[#0 term/0]
diff --git a/stdlib/source/test/lux/tool/compiler/language/lux/analysis/module.lux b/stdlib/source/test/lux/tool/compiler/language/lux/analysis/module.lux
index 9f641f906..d81170a17 100644
--- a/stdlib/source/test/lux/tool/compiler/language/lux/analysis/module.lux
+++ b/stdlib/source/test/lux/tool/compiler/language/lux/analysis/module.lux
@@ -94,7 +94,7 @@
(try#each (..new? hash))
(try.else false)))
(_.coverage [/.import]
- (`` (and (~~ (template [<expected>]
+ (`` (and (~~ (with_template [<expected>]
[(|> (do [! /phase.monad]
[_ (/.create hash expected_import)
[it ?] (/.with hash name
@@ -140,7 +140,7 @@
name (random.lower_case 1)
hash random.nat]
(`` (all _.and
- (~~ (template [<set> <query> <not/0> <not/1>]
+ (~~ (with_template [<set> <query> <not/0> <not/1>]
[(_.coverage [<set> <query>]
(|> (do [! /phase.monad]
[[it ?] (/.with hash name
@@ -159,7 +159,7 @@
[/.set_cached /.cached? /.active? /.compiled?]
))
(_.coverage [/.can_only_change_state_of_active_module]
- (and (~~ (template [<pre> <post>]
+ (and (~~ (with_template [<pre> <post>]
[(|> (/.with hash name
(do /phase.monad
[_ (<pre> name)]
@@ -180,7 +180,7 @@
[/.set_cached /.set_cached]
))))
(_.coverage [/.unknown_module]
- (and (~~ (template [<set>]
+ (and (~~ (with_template [<set>]
[(|> (<set> name)
(/phase.result state)
(pipe.case
@@ -220,7 +220,7 @@
alias {.#Alias [module_name def_name]}]]
(all _.and
(_.coverage [/.define]
- (`` (and (~~ (template [<global>]
+ (`` (and (~~ (with_template [<global>]
[(|> (/.with hash module_name
(/.define def_name <global>))
(/phase.result state)
@@ -242,7 +242,7 @@
{try.#Success _} true
{try.#Failure _} false)))))
(_.coverage [/.cannot_define_more_than_once]
- (`` (and (~~ (template [<global>]
+ (`` (and (~~ (with_template [<global>]
[(|> (/.with hash module_name
(do /phase.monad
[_ (/.define def_name <global>)]
@@ -289,7 +289,7 @@
(at ! each set.list))]
(all _.and
(_.coverage [/.declare_labels]
- (`` (and (~~ (template [<side> <record?> <query> <on_success>]
+ (`` (and (~~ (with_template [<side> <record?> <query> <on_success>]
[(|> (/.with hash module_name
(do [! /phase.monad]
[.let [it {.#Named [module_name def_name] def_type}]
@@ -307,7 +307,7 @@
[.#Right true meta.slot true]
[.#Right true meta.tag false])))))
(_.coverage [/.cannot_declare_labels_for_anonymous_type]
- (`` (and (~~ (template [<side> <record?>]
+ (`` (and (~~ (with_template [<side> <record?>]
[(|> (/.with hash module_name
(do [! /phase.monad]
[.let [it def_type]
@@ -324,7 +324,7 @@
[.#Left false]
[.#Right true])))))
(_.coverage [/.cannot_declare_labels_for_foreign_type]
- (`` (and (~~ (template [<side> <record?>]
+ (`` (and (~~ (with_template [<side> <record?>]
[(|> (/.with hash module_name
(do [! /phase.monad]
[.let [it {.#Named [foreign_module def_name] def_type}]
diff --git a/stdlib/source/test/lux/tool/compiler/language/lux/analysis/pattern.lux b/stdlib/source/test/lux/tool/compiler/language/lux/analysis/pattern.lux
index b45859c4f..8c3636a55 100644
--- a/stdlib/source/test/lux/tool/compiler/language/lux/analysis/pattern.lux
+++ b/stdlib/source/test/lux/tool/compiler/language/lux/analysis/pattern.lux
@@ -61,7 +61,7 @@
_
false))
- (~~ (template [<tag> <value>]
+ (~~ (with_template [<tag> <value>]
[(_.coverage [<tag>]
(case (<tag> <value>)
(pattern (<tag> actual))
diff --git a/stdlib/source/test/lux/tool/compiler/language/lux/analysis/scope.lux b/stdlib/source/test/lux/tool/compiler/language/lux/analysis/scope.lux
index 8a4730a35..584eb63b2 100644
--- a/stdlib/source/test/lux/tool/compiler/language/lux/analysis/scope.lux
+++ b/stdlib/source/test/lux/tool/compiler/language/lux/analysis/scope.lux
@@ -32,7 +32,7 @@
["$[0]" //
["[1][0]" type]])
-(template [<name> <tag>]
+(with_template [<name> <tag>]
[(def: (<name> expected_type expected_register [actual_type actual_var])
(-> Type Register [Type Variable] Bit)
(and (same? expected_type actual_type)
diff --git a/stdlib/source/test/lux/tool/compiler/language/lux/phase/analysis.lux b/stdlib/source/test/lux/tool/compiler/language/lux/phase/analysis.lux
index 16e9fa6c6..6cc3dd37a 100644
--- a/stdlib/source/test/lux/tool/compiler/language/lux/phase/analysis.lux
+++ b/stdlib/source/test/lux/tool/compiler/language/lux/phase/analysis.lux
@@ -79,7 +79,7 @@
(-> Lux Text [.Bit .Nat .Int .Rev .Frac .Text] Bit)
(let [state [extension.#bundle (extension/analysis.bundle ..eval)
extension.#state lux]]
- (`` (and (~~ (template [<expected> <code> <type> <analysis>]
+ (`` (and (~~ (with_template [<expected> <code> <type> <analysis>]
[(|> (do phase.monad
[[:it: it] (|> <expected>
<code>
@@ -138,7 +138,7 @@
(phase#each (|>> product.right product.right))
(phase.result state)
(try.else false))
- (~~ (template [<lefts> <right> <expected> <tag> <code> <analysis>]
+ (~~ (with_template [<lefts> <right> <expected> <tag> <code> <analysis>]
[(|> (do phase.monad
[it (|> (code.variant (list (code.nat <lefts>) (code.bit <right>) (<code> <expected>)))
(/.phase ..expander archive.empty)
@@ -252,7 +252,7 @@
(phase#each (|>> product.right product.right))
(phase.result state)
(try.else false))
- (~~ (template [<lefts> <right> <expected> <tag> <code> <analysis>]
+ (~~ (with_template [<lefts> <right> <expected> <tag> <code> <analysis>]
[(|> (do phase.monad
[_ (//module.declare_labels false tags/* false :variant:)
[:it: it] (|> (code.variant (list (code.local <tag>) (<code> <expected>)))
@@ -668,7 +668,7 @@
slots/* (list @any @bit @nat @int @rev @frac @text)
simple!
- (`` (and (~~ (template [<input> <code> <analysis> <pattern>]
+ (`` (and (~~ (with_template [<input> <code> <analysis> <pattern>]
[(|> (do phase.monad
[[:it: it] (|> (` ({(~ $parameter/0) (~ (code.frac frac/0))} (~ (<code> <input>))))
(/.phase ..expander archive.empty)
@@ -755,7 +755,7 @@
(try.else false))
variant!
- (`` (and (~~ (template [<lefts> <right?> <expected> <tag> <code> <analysis> <pattern>]
+ (`` (and (~~ (with_template [<lefts> <right?> <expected> <tag> <code> <analysis> <pattern>]
[(|> (do phase.monad
[_ (//module.declare_labels false tags/* false :variant:)
[:it: it] (|> (` ({{(~ (code.local <tag>)) (~ (<code> <expected>))}
@@ -935,7 +935,7 @@
(..can_analyse_pattern_matching! lux module/0 [@any @bit @nat @int @rev @frac @text] [bit/0 nat/0 int/0 rev/0 frac/0 text/0] $parameter/0)
))
(_.coverage [/.invalid]
- (`` (and (~~ (template [<syntax>]
+ (`` (and (~~ (with_template [<syntax>]
[(|> (do phase.monad
[_ (|> <syntax>
(/.phase ..expander archive.empty)
diff --git a/stdlib/source/test/lux/tool/compiler/language/lux/phase/analysis/complex.lux b/stdlib/source/test/lux/tool/compiler/language/lux/phase/analysis/complex.lux
index c991c5850..aecf1d14b 100644
--- a/stdlib/source/test/lux/tool/compiler/language/lux/phase/analysis/complex.lux
+++ b/stdlib/source/test/lux/tool/compiler/language/lux/phase/analysis/complex.lux
@@ -90,7 +90,7 @@
(def: simple_parameter
(Random [Type Code])
(`` (all random.either
- (~~ (template [<type> <random> <code>]
+ (~~ (with_template [<type> <random> <code>]
[(random#each (|>> <code> [<type>]) <random>)]
[.Bit random.bit code.bit]
@@ -115,7 +115,7 @@
(analysed? expected actual))
(list.zipped_2 expected actual)))
- (^.template [<expected> <actual>]
+ (^.with_template [<expected> <actual>]
[(pattern [[_ {<expected> expected}] (<actual> actual)])
(same? expected actual)])
([.#Bit //analysis.bit]
diff --git a/stdlib/source/test/lux/tool/compiler/language/lux/phase/analysis/simple.lux b/stdlib/source/test/lux/tool/compiler/language/lux/phase/analysis/simple.lux
index 66d8d5833..03a9dc1e6 100644
--- a/stdlib/source/test/lux/tool/compiler/language/lux/phase/analysis/simple.lux
+++ b/stdlib/source/test/lux/tool/compiler/language/lux/phase/analysis/simple.lux
@@ -66,15 +66,16 @@
_
false))))
-(template: (analysis? <type> <tag>)
- [(is (-> <type> Analysis Bit)
- (function (_ expected)
- (|>> (pipe.case
- (pattern (<tag> actual))
- (same? expected actual)
+(def: analysis?
+ (template (_ <type> <tag>)
+ [(is (-> <type> Analysis Bit)
+ (function (_ expected)
+ (|>> (pipe.case
+ (pattern (<tag> actual))
+ (same? expected actual)
- _
- false))))])
+ _
+ false))))]))
(def: .public test
(<| (_.covering /._)
@@ -88,7 +89,7 @@
(_.coverage [/.unit]
(..analysis state module .Any /.unit
(|>> (pipe.case (pattern (/analysis.unit)) true _ false))))
- (~~ (template [<analysis> <type> <random> <tag>]
+ (~~ (with_template [<analysis> <type> <random> <tag>]
[(do !
[sample <random>]
(_.coverage [<analysis>]
diff --git a/stdlib/source/test/lux/tool/compiler/language/lux/phase/extension/analysis/lux.lux b/stdlib/source/test/lux/tool/compiler/language/lux/phase/extension/analysis/lux.lux
index b2e9131ca..0123bd0bc 100644
--- a/stdlib/source/test/lux/tool/compiler/language/lux/phase/extension/analysis/lux.lux
+++ b/stdlib/source/test/lux/tool/compiler/language/lux/phase/extension/analysis/lux.lux
@@ -33,7 +33,7 @@
[meta
["[0]" archive]]]]]])
-(template [<name> <success> <failure>]
+(with_template [<name> <success> <failure>]
[(def: (<name> procedure params output_type)
(-> Text (List Code) Type Bit)
(|> (////scope.with_scope ""
diff --git a/stdlib/source/test/lux/tool/compiler/language/lux/phase/synthesis/case.lux b/stdlib/source/test/lux/tool/compiler/language/lux/phase/synthesis/case.lux
index 11cadf681..4a79735c7 100644
--- a/stdlib/source/test/lux/tool/compiler/language/lux/phase/synthesis/case.lux
+++ b/stdlib/source/test/lux/tool/compiler/language/lux/phase/synthesis/case.lux
@@ -195,7 +195,7 @@
_
(undefined))))))
-(template [<name> <hash> <random> <path> <synthesis> <pattern> <analysis>]
+(with_template [<name> <hash> <random> <path> <synthesis> <pattern> <analysis>]
[(def: <name>
(Random [Path Match])
(do [! random.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 9ec225645..9dae4cabc 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
@@ -63,13 +63,14 @@
body
(list.reversed (list.indices arity))))
-(template: (!expect <pattern> <value>)
- (case <value>
- <pattern>
- true
-
- _
- false))
+(def: !expect
+ (template (_ <pattern> <value>)
+ (case <value>
+ <pattern>
+ true
+
+ _
+ false)))
(type: Circumstance
(Record
@@ -87,7 +88,7 @@
(synthesis.text synthesis.unit)
(analysis.unit)]))
-(template [<name> <random> <synthesis> <analysis>]
+(with_template [<name> <random> <synthesis> <analysis>]
[(def: (<name> output?)
Scenario
(do [! random.monad]
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 6c17b1883..c123d5ef7 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
@@ -29,7 +29,7 @@
(def: (primitive offset arity next)
(Scenario Synthesis)
(`` (all random.either
- (~~ (template [<synthesis> <random>]
+ (~~ (with_template [<synthesis> <random>]
[(do [! random.monad]
[example (at ! each (|>> <synthesis>) <random>)]
(in [next
@@ -72,7 +72,7 @@
(def: (reference offset arity next)
(Scenario Synthesis)
(`` (all random.either
- (~~ (template [<tag> <random>]
+ (~~ (with_template [<tag> <random>]
[(do [! random.monad]
[[next [exampleE exampleA]] (<random> offset arity next)]
(in [next
@@ -115,7 +115,7 @@
(random#in [next
[//.path/pop
//.path/pop]])
- (~~ (template [<path> <random>]
+ (~~ (with_template [<path> <random>]
[(do [! random.monad]
[example (at ! each (|>> <path>) <random>)]
(in [next
@@ -127,7 +127,7 @@
[//.path/f64 random.frac]
[//.path/text (random.unicode 1)]
))
- (~~ (template [<path>]
+ (~~ (with_template [<path>]
[(do [! random.monad]
[example (at ! each (|>> <path>)
(random.or random.nat
diff --git a/stdlib/source/test/lux/tool/compiler/language/lux/phase/synthesis/primitive.lux b/stdlib/source/test/lux/tool/compiler/language/lux/phase/synthesis/primitive.lux
index 3e6cdda9c..fc6758d5a 100644
--- a/stdlib/source/test/lux/tool/compiler/language/lux/phase/synthesis/primitive.lux
+++ b/stdlib/source/test/lux/tool/compiler/language/lux/phase/synthesis/primitive.lux
@@ -45,7 +45,7 @@
(def: .public (corresponds? analysis synthesis)
(-> Analysis Synthesis Bit)
(`` (case [analysis synthesis]
- (~~ (template [<analysis> <post_analysis> <synthesis> <post_synthesis>]
+ (~~ (with_template [<analysis> <post_analysis> <synthesis> <post_synthesis>]
[[{////analysis.#Primitive {<analysis> expected}}
{////synthesis.#Primitive {<synthesis> actual}}]
(same? (|> expected <post_analysis>)
@@ -75,7 +75,7 @@
Test
(<| (_.context (%.symbol (symbol ////synthesis.#Primitive)))
(`` (all _.and
- (~~ (template [<analysis> <synthesis> <generator>]
+ (~~ (with_template [<analysis> <synthesis> <generator>]
[(do r.monad
[expected <generator>]
(_.property (%.symbol (symbol <synthesis>))
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 4f3d1de26..8d284b15f 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
@@ -27,13 +27,14 @@
[reference
["[0]" variable]]]]]])
-(template: (!expect <pattern> <value>)
- (case <value>
- <pattern>
- true
-
- _
- false))
+(def: !expect
+ (template (_ <pattern> <value>)
+ (case <value>
+ <pattern>
+ true
+
+ _
+ false)))
(type: Context
[#redundants Nat
@@ -42,7 +43,7 @@
(type: (Scenario a)
(-> Context (Random [a a])))
-(template [<name> <synthesis> <random>]
+(with_template [<name> <synthesis> <random>]
[(def: (<name> context)
(Scenario Synthesis)
(do [! random.monad]
@@ -178,7 +179,7 @@
{synthesis.#Seq {synthesis.#Pop}
{synthesis.#Then actual_then}}}])))
(all random.either
- (~~ (template [<tag> <random>]
+ (~~ (with_template [<tag> <random>]
[(do [! random.monad]
[test <random>
[expected_then actual_then] (scenario context)]
diff --git a/stdlib/source/test/lux/tool/compiler/meta/archive/registry.lux b/stdlib/source/test/lux/tool/compiler/meta/archive/registry.lux
index 8fa2fc9e6..ec53d9f99 100644
--- a/stdlib/source/test/lux/tool/compiler/meta/archive/registry.lux
+++ b/stdlib/source/test/lux/tool/compiler/meta/archive/registry.lux
@@ -29,13 +29,14 @@
["[0]" artifact (.only)
["[0]" category]]]]])
-(template: (tagged? <tag> <it>)
- [(case <it>
- {<tag> _}
- true
-
- _
- false)])
+(def: tagged?
+ (template (_ <tag> <it>)
+ [(case <it>
+ {<tag> _}
+ true
+
+ _
+ false)]))
(def: random_dependency
(Random unit.ID)
@@ -78,7 +79,7 @@
_
false)))
- (~~ (template [<new> <expected>' <query> <tag> <wrong_new> <wrong_expected>']
+ (~~ (with_template [<new> <expected>' <query> <tag> <wrong_new> <wrong_expected>']
[(_.coverage [<new> <query>]
(let [<expected> <expected>'
<wrong_expected> <wrong_expected>']
@@ -119,7 +120,7 @@
[/.custom expected_name /.customs category.#Custom /.definition (is category.Definition [expected_name {.#None}])]
))
(_.coverage [/.id]
- (and (~~ (template [<new> <expected>' <name>]
+ (and (~~ (with_template [<new> <expected>' <name>]
[(let [<expected> <expected>'
[@expected registry] (<new> <expected> mandatory? expected_dependencies /.empty)]
(|> (/.id (<name> <expected>) registry)
@@ -134,7 +135,7 @@
[/.custom expected_name |>]
))))
(_.coverage [/.artifacts]
- (and (~~ (template [<new> <query> <equivalence> <$>]
+ (and (~~ (with_template [<new> <query> <equivalence> <$>]
[(let [expected/* (list#each <$> expected_names)
[ids registry] (is [(Sequence artifact.ID) /.Registry]
(list#mix (function (_ expected [ids registry])
@@ -159,7 +160,7 @@
[/.custom /.customs text.equivalence (|>>)]
))))
(_.coverage [/.writer /.parser]
- (and (~~ (template [<new> <expected>' <name>]
+ (and (~~ (with_template [<new> <expected>' <name>]
[(let [<expected> <expected>'
[@expected before] (<new> <expected> mandatory? expected_dependencies /.empty)]
(|> before
diff --git a/stdlib/source/test/lux/tool/compiler/meta/cache/module.lux b/stdlib/source/test/lux/tool/compiler/meta/cache/module.lux
index 3975036e0..30dd30486 100644
--- a/stdlib/source/test/lux/tool/compiler/meta/cache/module.lux
+++ b/stdlib/source/test/lux/tool/compiler/meta/cache/module.lux
@@ -21,7 +21,7 @@
(`` (implementation: (bad it)
(-> (file.System Async) (file.System Async))
- (~~ (template [<name>]
+ (~~ (with_template [<name>]
[(def: <name>
(at it <name>))]
diff --git a/stdlib/source/test/lux/tool/compiler/meta/cli.lux b/stdlib/source/test/lux/tool/compiler/meta/cli.lux
index cc1951950..9617831ab 100644
--- a/stdlib/source/test/lux/tool/compiler/meta/cli.lux
+++ b/stdlib/source/test/lux/tool/compiler/meta/cli.lux
@@ -55,7 +55,7 @@
(all _.and
(_.for [/.Compilation]
(`` (all _.and
- (~~ (template [<type> <slot> <?>]
+ (~~ (with_template [<type> <slot> <?>]
[(_.coverage [<type>]
(|> (partial_list "build" compilation')
(<cli>.result /.service)
@@ -79,7 +79,7 @@
))
)))
(_.coverage [/.Interpretation]
- (`` (and (~~ (template [<slot> <?>]
+ (`` (and (~~ (with_template [<slot> <?>]
[(|> (partial_list "repl" compilation')
(<cli>.result /.service)
(try#each (|>> (pipe.case
@@ -101,7 +101,7 @@
[/.#configuration (configuration#= configuration)]
)))))
(_.coverage [/.Export]
- (`` (and (~~ (template [<side> <?>]
+ (`` (and (~~ (with_template [<side> <?>]
[(|> (partial_list "export" export)
(<cli>.result /.service)
(try#each (|>> (pipe.case
@@ -118,7 +118,7 @@
[product.right (same? target)]
)))))
(_.coverage [/.target]
- (`` (and (~~ (template [<it>]
+ (`` (and (~~ (with_template [<it>]
[(same? target (/.target <it>))]
[{/.#Compilation [/.#host_dependencies host_dependencies
diff --git a/stdlib/source/test/lux/tool/compiler/meta/context.lux b/stdlib/source/test/lux/tool/compiler/meta/context.lux
index 9c993c22a..41c2adf26 100644
--- a/stdlib/source/test/lux/tool/compiler/meta/context.lux
+++ b/stdlib/source/test/lux/tool/compiler/meta/context.lux
@@ -41,7 +41,7 @@
(/.python target)
(/.ruby target))
maximum (list.size contexts)]
- (`` (and (~~ (template [<amount> <slot>]
+ (`` (and (~~ (with_template [<amount> <slot>]
[(|> contexts
(list#each (the <slot>))
(set.of_list text.hash)
diff --git a/stdlib/source/test/lux/tool/compiler/reference.lux b/stdlib/source/test/lux/tool/compiler/reference.lux
index 183e872ff..1991765de 100644
--- a/stdlib/source/test/lux/tool/compiler/reference.lux
+++ b/stdlib/source/test/lux/tool/compiler/reference.lux
@@ -49,7 +49,7 @@
(_.for [/.hash]
($hash.spec /.hash ..random))
- (~~ (template [<tag>]
+ (~~ (with_template [<tag>]
[(_.coverage [<tag>]
(case (<tag> expected_register)
(pattern (<tag> actual_register))
diff --git a/stdlib/source/test/lux/tool/compiler/version.lux b/stdlib/source/test/lux/tool/compiler/version.lux
index cd3bf39ee..88cb62e09 100644
--- a/stdlib/source/test/lux/tool/compiler/version.lux
+++ b/stdlib/source/test/lux/tool/compiler/version.lux
@@ -30,7 +30,7 @@
(_.coverage [/.format]
(bit#= (n.= this that)
(text#= (/.format this) (/.format that))))
- (~~ (template [<level>]
+ (~~ (with_template [<level>]
[(_.coverage [<level>]
(text.contains? (%.nat (<level> this))
(/.format this)))]