aboutsummaryrefslogtreecommitdiff
path: root/stdlib/source/test
diff options
context:
space:
mode:
authorEduardo Julian2022-07-03 00:35:32 -0400
committerEduardo Julian2022-07-03 00:35:32 -0400
commit9e7ddacf853efd7a18c1911d2f287d483b083229 (patch)
tree140eee091b7453879f072a48044635d03aa5096b /stdlib/source/test
parent7e4c9ba2e02f06fa621ffe24bc0ca046536429ef (diff)
Added a new custom type for pattern-matching macros.
Diffstat (limited to 'stdlib/source/test')
-rw-r--r--stdlib/source/test/lux.lux21
-rw-r--r--stdlib/source/test/lux/abstract/apply.lux2
-rw-r--r--stdlib/source/test/lux/abstract/functor.lux6
-rw-r--r--stdlib/source/test/lux/abstract/interval.lux8
-rw-r--r--stdlib/source/test/lux/control/concurrency/actor.lux2
-rw-r--r--stdlib/source/test/lux/control/parser.lux2
-rw-r--r--stdlib/source/test/lux/control/remember.lux4
-rw-r--r--stdlib/source/test/lux/data/collection/array.lux14
-rw-r--r--stdlib/source/test/lux/data/collection/list.lux2
-rw-r--r--stdlib/source/test/lux/data/format/json.lux2
-rw-r--r--stdlib/source/test/lux/data/format/tar.lux12
-rw-r--r--stdlib/source/test/lux/data/text/regex.lux2
-rw-r--r--stdlib/source/test/lux/documentation.lux6
-rw-r--r--stdlib/source/test/lux/math/logic/fuzzy.lux4
-rw-r--r--stdlib/source/test/lux/meta.lux2
-rw-r--r--stdlib/source/test/lux/meta/macro/pattern.lux6
-rw-r--r--stdlib/source/test/lux/meta/type.lux2
-rw-r--r--stdlib/source/test/lux/tool/compiler/language/lux/analysis.lux16
-rw-r--r--stdlib/source/test/lux/tool/compiler/language/lux/analysis/coverage.lux2
-rw-r--r--stdlib/source/test/lux/tool/compiler/language/lux/analysis/module.lux2
-rw-r--r--stdlib/source/test/lux/tool/compiler/language/lux/analysis/pattern.lux18
-rw-r--r--stdlib/source/test/lux/tool/compiler/language/lux/phase/analysis.lux182
-rw-r--r--stdlib/source/test/lux/tool/compiler/language/lux/phase/analysis/complex.lux26
-rw-r--r--stdlib/source/test/lux/tool/compiler/language/lux/phase/analysis/reference.lux12
-rw-r--r--stdlib/source/test/lux/tool/compiler/language/lux/phase/analysis/simple.lux15
-rw-r--r--stdlib/source/test/lux/tool/compiler/language/lux/phase/synthesis/case.lux10
-rw-r--r--stdlib/source/test/lux/tool/compiler/language/lux/phase/synthesis/function.lux2
-rw-r--r--stdlib/source/test/lux/tool/compiler/language/lux/phase/synthesis/loop.lux4
-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/structure.lux4
-rw-r--r--stdlib/source/test/lux/tool/compiler/meta/archive.lux2
-rw-r--r--stdlib/source/test/lux/tool/compiler/meta/archive/registry.lux8
-rw-r--r--stdlib/source/test/lux/tool/compiler/meta/export.lux8
-rw-r--r--stdlib/source/test/lux/tool/compiler/reference.lux8
-rw-r--r--stdlib/source/test/lux/tool/compiler/reference/variable.lux2
-rw-r--r--stdlib/source/test/lux/world/file/watch.lux6
36 files changed, 218 insertions, 210 deletions
diff --git a/stdlib/source/test/lux.lux b/stdlib/source/test/lux.lux
index 1452a1aed..a857eee53 100644
--- a/stdlib/source/test/lux.lux
+++ b/stdlib/source/test/lux.lux
@@ -173,7 +173,7 @@
(all _.and
(_.coverage [/.list]
(case (/.list e/0 e/1)
- (pattern (/.list a/0 a/1))
+ (/.list a/0 a/1)
(and (n.= e/0 a/0)
(n.= e/1 a/1))
@@ -550,7 +550,7 @@
(same? /.Nat (/.type_of expected)))
(_.coverage [/.Primitive]
(case (/.Primitive "foo" [expected/0 expected/1])
- (pattern {.#Primitive "foo" (list actual/0 actual/1)})
+ {.#Primitive "foo" (list actual/0 actual/1)}
(and (same? expected/0 actual/0)
(same? expected/1 actual/1))
@@ -681,8 +681,8 @@
(all _.and
(_.coverage [/.static]
(case sample
- (pattern (/.static option/0)) true
- (pattern (/.static option/1)) true
+ (/.static option/0) true
+ (/.static option/1) true
_ false))
(_.coverage [/.char]
(|> (`` (/.char (,, (/.static static_char))))
@@ -982,10 +982,13 @@
{.#Right +0} true
_ false)
))
- (_.coverage [/.pattern]
- (/.case [..#left expected_nat ..#right expected_int]
- (/.pattern (!pair 0 +0)) true
- _ false))
+ ... (_.coverage [/.pattern]
+ ... (/.case [..#left expected_nat ..#right expected_int]
+ ... (!pair 0 +0)
+ ... true
+
+ ... _
+ ... false))
(_.coverage [/.let]
(and (/.let [actual_nat expected_nat]
(/.same? expected_nat actual_nat))
@@ -1105,7 +1108,7 @@
let/3 <code>.local])
(in (list (code.bit (case (the .#scopes lux_state)
- (pattern (list.partial scope/2 _))
+ (list.partial scope/2 _)
(let [locals/2 (the .#locals scope/2)
expected_locals/2 (set.of_list text.hash (list fn/2 var/2 let/2
let/3))
diff --git a/stdlib/source/test/lux/abstract/apply.lux b/stdlib/source/test/lux/abstract/apply.lux
index d7c75cbe2..b120b3484 100644
--- a/stdlib/source/test/lux/abstract/apply.lux
+++ b/stdlib/source/test/lux/abstract/apply.lux
@@ -28,7 +28,7 @@
(case (at (/.composite maybe.monad maybe.apply list.apply) on
{.#Some (list right)}
{.#Some (list (n.+ left))})
- (pattern {.#Some (list actual)})
+ {.#Some (list actual)}
(n.= expected actual)
_
diff --git a/stdlib/source/test/lux/abstract/functor.lux b/stdlib/source/test/lux/abstract/functor.lux
index 9cca3367b..548acee7a 100644
--- a/stdlib/source/test/lux/abstract/functor.lux
+++ b/stdlib/source/test/lux/abstract/functor.lux
@@ -63,7 +63,7 @@
(case (at (/.sum maybe.functor list.functor) each
(n.+ shift)
{.#Right (list right)})
- (pattern {.#Right (list actual)})
+ {.#Right (list actual)}
(n.= (n.+ shift right) actual)
_
@@ -72,7 +72,7 @@
(case (at (/.product maybe.functor list.functor) each
(n.+ shift)
[{.#Some left} (list right)])
- (pattern [{.#Some actualL} (list actualR)])
+ [{.#Some actualL} (list actualR)]
(and (n.= (n.+ shift left) actualL)
(n.= (n.+ shift right) actualR))
@@ -82,7 +82,7 @@
(case (at (/.composite maybe.functor list.functor) each
(n.+ shift)
{.#Some (list left)})
- (pattern {.#Some (list actual)})
+ {.#Some (list actual)}
(n.= (n.+ shift left) actual)
_
diff --git a/stdlib/source/test/lux/abstract/interval.lux b/stdlib/source/test/lux/abstract/interval.lux
index 2fa7f5023..438a02394 100644
--- a/stdlib/source/test/lux/abstract/interval.lux
+++ b/stdlib/source/test/lux/abstract/interval.lux
@@ -142,7 +142,7 @@
(at ! each (|>> set.list
(list.sorted n.<)
(pipe.case
- (pattern (list b t1 t2))
+ (list b t1 t2)
[b t1 t2]
_
@@ -165,7 +165,7 @@
(at ! each (|>> set.list
(list.sorted n.<)
(pipe.case
- (pattern (list b t1 t2))
+ (list b t1 t2)
[b t1 t2]
_
@@ -193,7 +193,7 @@
(at ! each (|>> set.list
(list.sorted n.<)
(pipe.case
- (pattern (list x0 x1 x2 x3))
+ (list x0 x1 x2 x3)
[x0 x1 x2 x3]
_
@@ -227,7 +227,7 @@
(at ! each (|>> set.list
(list.sorted n.<)
(pipe.case
- (pattern (list x0 x1 x2 x3))
+ (list x0 x1 x2 x3)
[x0 x1 x2 x3]
_
diff --git a/stdlib/source/test/lux/control/concurrency/actor.lux b/stdlib/source/test/lux/control/concurrency/actor.lux
index 218dfcb3d..d3ecb4887 100644
--- a/stdlib/source/test/lux/control/concurrency/actor.lux
+++ b/stdlib/source/test/lux/control/concurrency/actor.lux
@@ -143,7 +143,7 @@
(in {try.#Success [actor sent? alive? obituary]})))]
(_.coverage' [/.Obituary /.obituary']
(case result
- (pattern {try.#Success [actor sent? alive? {.#Some [error state (list single_pending_message)]}]})
+ {try.#Success [actor sent? alive? {.#Some [error state (list single_pending_message)]}]}
(and (..mailed? sent?)
(not alive?)
(exception.match? ..got_wrecked error)
diff --git a/stdlib/source/test/lux/control/parser.lux b/stdlib/source/test/lux/control/parser.lux
index 2a7139b86..31b5ac78a 100644
--- a/stdlib/source/test/lux/control/parser.lux
+++ b/stdlib/source/test/lux/control/parser.lux
@@ -69,7 +69,7 @@
then <code>.any
input <code>.any])
(in (list (` (case (, input)
- (pattern {try.#Success [(,' _) (, pattern)]})
+ {try.#Success [(,' _) (, pattern)]}
(, then)
(,' _)
diff --git a/stdlib/source/test/lux/control/remember.lux b/stdlib/source/test/lux/control/remember.lux
index 9f79123c1..83dc740e8 100644
--- a/stdlib/source/test/lux/control/remember.lux
+++ b/stdlib/source/test/lux/control/remember.lux
@@ -92,13 +92,13 @@
_
false)
(case should_succeed0
- (pattern {try.#Success (list)})
+ {try.#Success (list)}
true
_
false)
(case should_succeed1
- (pattern {try.#Success (list actual)})
+ {try.#Success (list actual)}
(same? expected actual)
_
diff --git a/stdlib/source/test/lux/data/collection/array.lux b/stdlib/source/test/lux/data/collection/array.lux
index d2be45fa4..ebe7676a0 100644
--- a/stdlib/source/test/lux/data/collection/array.lux
+++ b/stdlib/source/test/lux/data/collection/array.lux
@@ -156,9 +156,9 @@
(!.empty size)))))
(_.coverage [!.type]
(case !.Array
- (pattern (<| {.#Named (symbol !.Array)}
- {.#UnivQ (list)}
- {.#Primitive nominal_type (list {.#Parameter 1})}))
+ (<| {.#Named (symbol !.Array)}
+ {.#UnivQ (list)}
+ {.#Primitive nominal_type (list {.#Parameter 1})})
(same? !.type nominal_type)
_
@@ -324,10 +324,10 @@
(/.empty size)))))
(_.coverage [/.type_name]
(case /.Array
- (pattern (<| {.#Named (symbol /.Array)}
- {.#Named (symbol !.Array)}
- {.#UnivQ (list)}
- {.#Primitive nominal_type (list {.#Parameter 1})}))
+ (<| {.#Named (symbol /.Array)}
+ {.#Named (symbol !.Array)}
+ {.#UnivQ (list)}
+ {.#Primitive nominal_type (list {.#Parameter 1})})
(same? /.type_name nominal_type)
_
diff --git a/stdlib/source/test/lux/data/collection/list.lux b/stdlib/source/test/lux/data/collection/list.lux
index 2e5734c23..f915d4316 100644
--- a/stdlib/source/test/lux/data/collection/list.lux
+++ b/stdlib/source/test/lux/data/collection/list.lux
@@ -77,7 +77,7 @@
b (in subject)]
(in (n.+ a b))))
(pipe.case
- (pattern (list actual))
+ (list actual)
(n.= expected actual)
_
diff --git a/stdlib/source/test/lux/data/format/json.lux b/stdlib/source/test/lux/data/format/json.lux
index 0e7ec6b44..8eb35a192 100644
--- a/stdlib/source/test/lux/data/format/json.lux
+++ b/stdlib/source/test/lux/data/format/json.lux
@@ -151,7 +151,7 @@
[boolean_field number_field string_field] (|> (random.set text.hash 3 (random.unicode 3))
(at ! each (|>> set.list
(pipe.case
- (pattern (list boolean_field number_field string_field))
+ (list boolean_field number_field string_field)
[boolean_field number_field string_field]
_
diff --git a/stdlib/source/test/lux/data/format/tar.lux b/stdlib/source/test/lux/data/format/tar.lux
index 817c38c5a..7f695042d 100644
--- a/stdlib/source/test/lux/data/format/tar.lux
+++ b/stdlib/source/test/lux/data/format/tar.lux
@@ -174,7 +174,7 @@
(\\format.result /.format)
(<b>.result /.parser))]
(in (case (sequence.list tar)
- (pattern (list {<tag> actual_path}))
+ (list {<tag> actual_path})
(text#= (/.from_path expected_path)
(/.from_path actual_path))
@@ -203,7 +203,7 @@
(\\format.result /.format)
(<b>.result /.parser))]
(in (case (sequence.list tar)
- (pattern (list {<tag> [actual_path actual_moment actual_mode actual_ownership actual_content]}))
+ (list {<tag> [actual_path actual_moment actual_mode actual_ownership actual_content]})
(let [seconds (is (-> Instant Int)
(|>> instant.relative (duration.ticks duration.second)))]
(and (text#= (/.from_path expected_path)
@@ -261,7 +261,7 @@
(\\format.result /.format)
(<b>.result /.parser))]
(in (case (sequence.list tar)
- (pattern (list {/.#Normal [_ _ actual_mode _ _]}))
+ (list {/.#Normal [_ _ actual_mode _ _]})
(n.= (/.mode expected_mode)
(/.mode actual_mode))
@@ -284,7 +284,7 @@
(\\format.result /.format)
(<b>.result /.parser))]
(in (case (sequence.list tar)
- (pattern (list {/.#Normal [_ _ actual_mode _ _]}))
+ (list {/.#Normal [_ _ actual_mode _ _]})
(n.= (/.mode <expected_mode>)
(/.mode actual_mode))
@@ -351,7 +351,7 @@
(\\format.result /.format)
(<b>.result /.parser))]
(in (case (sequence.list tar)
- (pattern (list {/.#Normal [_ _ _ actual_ownership _]}))
+ (list {/.#Normal [_ _ _ actual_ownership _]})
(and (text#= (/.from_name expected)
(/.from_name (the [/.#user /.#name] actual_ownership)))
(text#= (/.from_name /.anonymous)
@@ -375,7 +375,7 @@
(\\format.result /.format)
(<b>.result /.parser))]
(in (case (sequence.list tar)
- (pattern (list {/.#Normal [_ _ _ actual_ownership _]}))
+ (list {/.#Normal [_ _ _ actual_ownership _]})
(and (text#= (/.from_name /.anonymous)
(/.from_name (the [/.#user /.#name] actual_ownership)))
(n.= (/.from_small /.no_id)
diff --git a/stdlib/source/test/lux/data/text/regex.lux b/stdlib/source/test/lux/data/text/regex.lux
index faadefa50..48b376358 100644
--- a/stdlib/source/test/lux/data/text/regex.lux
+++ b/stdlib/source/test/lux/data/text/regex.lux
@@ -63,7 +63,7 @@
(in (list (` (|> (, input)
(<text>.result (, regex))
(pipe.case
- (pattern {try.#Success (, pattern)})
+ {try.#Success (, pattern)}
true
(, g!_)
diff --git a/stdlib/source/test/lux/documentation.lux b/stdlib/source/test/lux/documentation.lux
index 37aff4544..c9d9cbc43 100644
--- a/stdlib/source/test/lux/documentation.lux
+++ b/stdlib/source/test/lux/documentation.lux
@@ -55,7 +55,7 @@
(all _.and
(_.coverage [/.default]
(case (`` (/.default (,, (template.symbol [.._] [g!default]))))
- (pattern (list definition))
+ (list definition)
(and (|> definition
(the /.#definition)
(text#= (template.text [g!default])))
@@ -69,7 +69,7 @@
false))
(_.coverage [/.documentation]
(case ..documentation
- (pattern (list documentation))
+ (list documentation)
(and (|> documentation
(the /.#definition)
(text#= (template.text [/.documentation])))
@@ -99,7 +99,7 @@
(text.contains? (template.text ['super_description'])
(/.markdown super))
(case ..documentation
- (pattern (list documentation))
+ (list documentation)
(text.contains? (md.markdown (the /.#documentation documentation))
(/.markdown super))
diff --git a/stdlib/source/test/lux/math/logic/fuzzy.lux b/stdlib/source/test/lux/math/logic/fuzzy.lux
index 8336d39ef..5011e2eee 100644
--- a/stdlib/source/test/lux/math/logic/fuzzy.lux
+++ b/stdlib/source/test/lux/math/logic/fuzzy.lux
@@ -92,7 +92,7 @@
(at ! each (|>> set.list (list.sorted r.<)))
(random.one (function (_ thresholds)
(case thresholds
- (pattern (list threshold_0 threshold_1 threshold_2 threshold_3))
+ (list threshold_0 threshold_1 threshold_2 threshold_3)
{.#Some [threshold_0 threshold_1 threshold_2 threshold_3]}
_
@@ -176,7 +176,7 @@
(at ! each (|>> set.list (list.sorted r.<)))
(random.one (function (_ thresholds)
(case thresholds
- (pattern (list threshold_0 threshold_1 threshold_2 threshold_3))
+ (list threshold_0 threshold_1 threshold_2 threshold_3)
{.#Some [threshold_0 threshold_1 threshold_2 threshold_3]}
_
diff --git a/stdlib/source/test/lux/meta.lux b/stdlib/source/test/lux/meta.lux
index 5cd2da267..ea47a6fc7 100644
--- a/stdlib/source/test/lux/meta.lux
+++ b/stdlib/source/test/lux/meta.lux
@@ -813,7 +813,7 @@
(at ! each set.list)
(random.one (function (_ values)
(case values
- (pattern (list name_0 name_1 name_2 name_3 name_4))
+ (list name_0 name_1 name_2 name_3 name_4)
{.#Some [name_0 name_1 name_2 name_3 name_4]}
_
diff --git a/stdlib/source/test/lux/meta/macro/pattern.lux b/stdlib/source/test/lux/meta/macro/pattern.lux
index 7b9e161c1..6d5e3c559 100644
--- a/stdlib/source/test/lux/meta/macro/pattern.lux
+++ b/stdlib/source/test/lux/meta/macro/pattern.lux
@@ -64,7 +64,7 @@
(let [expected_pair (is (Pair Nat Int)
[..#left expected_nat ..#right expected_int])]
(/.case expected_pair
- (/.let actual_pair (/.pattern (!pair actual_left actual_right)))
+ (/.let actual_pair (!pair actual_left actual_right))
(and (/.same? expected_pair actual_pair)
(/.same? expected_nat actual_left)
(/.same? expected_int actual_right)))))
@@ -72,7 +72,7 @@
(let [expected_pair (is (Pair Nat Int)
[..#left expected_nat ..#right expected_int])]
(and (/.case expected_pair
- (/.multi (/.pattern (!pair 0 actual_right))
+ (/.multi (!pair 0 actual_right)
[actual_right
+0])
true
@@ -80,7 +80,7 @@
_
false)
(/.case expected_pair
- (/.multi (/.pattern (!pair 0 actual_right))
+ (/.multi (!pair 0 actual_right)
(i.= +0 actual_right))
true
diff --git a/stdlib/source/test/lux/meta/type.lux b/stdlib/source/test/lux/meta/type.lux
index d00adca34..9a78cd392 100644
--- a/stdlib/source/test/lux/meta/type.lux
+++ b/stdlib/source/test/lux/meta/type.lux
@@ -483,7 +483,7 @@
element_type (|> (..random 0)
(random.only (function (_ type)
(case type
- (pattern {.#Primitive name (list element_type)})
+ {.#Primitive name (list element_type)}
(not (text#= array.type_name name))
_
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 afa79d64e..a42a76432 100644
--- a/stdlib/source/test/lux/tool/compiler/language/lux/analysis.lux
+++ b/stdlib/source/test/lux/tool/compiler/language/lux/analysis.lux
@@ -243,7 +243,7 @@
(`` (all _.and
(_.coverage [/.unit]
(case (/.unit)
- (pattern (/.unit))
+ (/.unit)
true
_
@@ -251,7 +251,7 @@
(,, (with_template [<tag> <expected>]
[(_.coverage [<tag>]
(case (<tag> <expected>)
- (pattern (<tag> actual))
+ (<tag> actual)
(same? <expected> actual)
_
@@ -278,7 +278,7 @@
expected_right
expected_left)]
(case (/.variant [expected_lefts expected_right? expected])
- (pattern (/.variant [actual_lefts actual_right? actual]))
+ (/.variant [actual_lefts actual_right? actual])
(and (same? expected_lefts actual_lefts)
(same? expected_right? actual_right?)
(same? expected actual))
@@ -287,7 +287,7 @@
false)))
(_.coverage [/.tuple]
(case (/.tuple (list expected_left expected_right))
- (pattern (/.tuple (list actual_left actual_right)))
+ (/.tuple (list actual_left actual_right))
(and (same? expected_left actual_left)
(same? expected_right actual_right))
@@ -305,7 +305,7 @@
(,, (with_template [<tag> <expected>]
[(_.coverage [<tag>]
(case (<tag> <expected>)
- (pattern (<tag> actual))
+ (<tag> actual)
(same? <expected> actual)
_
@@ -339,7 +339,7 @@
(case (|> [expected_abstraction (list expected_parameter/0 expected_parameter/1)]
/.reified
/.reification)
- (pattern [actual_abstraction (list actual_parameter/0 actual_parameter/1)])
+ [actual_abstraction (list actual_parameter/0 actual_parameter/1)]
(and (same? expected_abstraction actual_abstraction)
(same? expected_parameter/0 actual_parameter/0)
(same? expected_parameter/1 actual_parameter/1))
@@ -348,7 +348,7 @@
false))
(_.coverage [/.no_op]
(case (/.no_op expected_parameter/0)
- (pattern (/.no_op actual))
+ (/.no_op actual)
(same? expected_parameter/0 actual)
_
@@ -363,7 +363,7 @@
(all _.and
(_.coverage [/.case]
(case (/.case [expected_input expected_match])
- (pattern (/.case [actual_input actual_match]))
+ (/.case [actual_input actual_match])
(and (same? expected_input actual_input)
(same? expected_match actual_match))
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 eb47e634e..417413fb0 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
@@ -1,6 +1,6 @@
(.require
[library
- [lux (.except)
+ [lux (.except Pattern)
["_" test (.only Test)]
[abstract
["[0]" monad (.only do)]
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 567992ebc..7a68264d7 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
@@ -122,7 +122,7 @@
(/phase.result state)
(try#each (|>> (the .#module_aliases)
(pipe.case
- (pattern (list [actual_alias actual_import]))
+ (list [actual_alias actual_import])
(and (same? expected_alias actual_alias)
(same? expected_import actual_import))
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 7c1ab849a..e3034f93c 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
@@ -56,7 +56,7 @@
(text#= (/.format left) (/.format right))))
(_.coverage [/.unit]
(case (/.unit)
- (pattern (/.unit))
+ (/.unit)
true
_
@@ -64,7 +64,7 @@
(,, (with_template [<tag> <value>]
[(_.coverage [<tag>]
(case (<tag> <value>)
- (pattern (<tag> actual))
+ (<tag> actual)
(same? <value> actual)
_
@@ -80,7 +80,7 @@
))
(_.coverage [/.variant]
(case (/.variant [expected_lefts expected_right? (/.text expected_text)])
- (pattern (/.variant [actual_lefts actual_right? (/.text actual_text)]))
+ (/.variant [actual_lefts actual_right? (/.text actual_text)])
(and (same? expected_lefts actual_lefts)
(same? expected_right? actual_right?)
(same? expected_text actual_text))
@@ -94,12 +94,12 @@
(/.rev expected_rev)
(/.frac expected_frac)
(/.text expected_text)))
- (pattern (/.tuple (list (/.bit actual_bit)
- (/.nat actual_nat)
- (/.int actual_int)
- (/.rev actual_rev)
- (/.frac actual_frac)
- (/.text actual_text))))
+ (/.tuple (list (/.bit actual_bit)
+ (/.nat actual_nat)
+ (/.int actual_int)
+ (/.rev actual_rev)
+ (/.frac actual_frac)
+ (/.text actual_text)))
(and (same? expected_bit actual_bit)
(same? expected_nat actual_nat)
(same? expected_int actual_int)
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 317a4ec53..91614f4b2 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
@@ -65,7 +65,7 @@
//type.inferring)]
(in (and (type#= .Any :it:)
(case it
- (pattern (//.unit))
+ (//.unit)
true
_
@@ -88,7 +88,7 @@
//type.inferring)]
(in (and (type#= <type> :it:)
(case it
- (pattern (<analysis> it))
+ (<analysis> it)
(same? <expected> it)
_
@@ -129,7 +129,7 @@
(/.phase ..expander archive.empty)
(//type.expecting :variant:))]
(in (case it
- (pattern (//.variant [0 #0 (//.unit)]))
+ (//.variant [0 #0 (//.unit)])
true
_
@@ -145,7 +145,7 @@
(/.phase ..expander archive.empty)
(//type.expecting :variant:))]
(in (case it
- (pattern (//.variant [<lefts> <right> (<analysis> actual)]))
+ (//.variant [<lefts> <right> (<analysis> actual)])
(same? <expected> actual)
_
@@ -171,7 +171,7 @@
(/.phase ..expander archive.empty)
(//type.expecting :either:))]
(in (case it
- (pattern (//.variant [0 #0 (//.unit)]))
+ (//.variant [0 #0 (//.unit)])
true
_
@@ -197,13 +197,13 @@
(/.phase ..expander archive.empty)
(//type.expecting :either:))]
(in (case it
- (pattern (//.variant [0 #1 (//.tuple (list (//.unit)
- (//.bit bit/?)
- (//.nat nat/?)
- (//.int int/?)
- (//.rev rev/?)
- (//.frac frac/?)
- (//.text text/?)))]))
+ (//.variant [0 #1 (//.tuple (list (//.unit)
+ (//.bit bit/?)
+ (//.nat nat/?)
+ (//.int int/?)
+ (//.rev rev/?)
+ (//.frac frac/?)
+ (//.text text/?)))])
(and (same? bit/0 bit/?)
(same? nat/0 nat/?)
(same? int/0 int/?)
@@ -243,7 +243,7 @@
(in (and (type#= :variant:
:it:)
(case it
- (pattern (//.variant [0 #0 (//.unit)]))
+ (//.variant [0 #0 (//.unit)])
true
_
@@ -262,7 +262,7 @@
(in (and (type#= :variant:
:it:)
(case it
- (pattern (//.variant [<lefts> <right> (<analysis> actual)]))
+ (//.variant [<lefts> <right> (<analysis> actual)])
(same? <expected> actual)
_
@@ -293,7 +293,7 @@
(in (and (type#= :either:
:it:)
(case it
- (pattern (//.variant [0 #0 (//.unit)]))
+ (//.variant [0 #0 (//.unit)])
true
_
@@ -323,13 +323,13 @@
(in (and (type#= :either:
:it:)
(case it
- (pattern (//.variant [0 #1 (//.tuple (list (//.unit)
- (//.bit bit/?)
- (//.nat nat/?)
- (//.int int/?)
- (//.rev rev/?)
- (//.frac frac/?)
- (//.text text/?)))]))
+ (//.variant [0 #1 (//.tuple (list (//.unit)
+ (//.bit bit/?)
+ (//.nat nat/?)
+ (//.int int/?)
+ (//.rev rev/?)
+ (//.frac frac/?)
+ (//.text text/?)))])
(and (same? bit/0 bit/?)
(same? nat/0 nat/?)
(same? int/0 int/?)
@@ -365,13 +365,13 @@
(in (and (type#= (type_literal [.Any .Bit .Nat .Int .Rev .Frac .Text])
:it:)
(case it
- (pattern (//.tuple (list (//.unit)
- (//.bit bit/?)
- (//.nat nat/?)
- (//.int int/?)
- (//.rev rev/?)
- (//.frac frac/?)
- (//.text text/?))))
+ (//.tuple (list (//.unit)
+ (//.bit bit/?)
+ (//.nat nat/?)
+ (//.int int/?)
+ (//.rev rev/?)
+ (//.frac frac/?)
+ (//.text text/?)))
(and (same? bit/0 bit/?)
(same? nat/0 nat/?)
(same? int/0 int/?)
@@ -408,13 +408,13 @@
(in (and (type#= :record:
:it:)
(case it
- (pattern (//.tuple (list (//.unit)
- (//.bit bit/?)
- (//.nat nat/?)
- (//.int int/?)
- (//.rev rev/?)
- (//.frac frac/?)
- (//.text text/?))))
+ (//.tuple (list (//.unit)
+ (//.bit bit/?)
+ (//.nat nat/?)
+ (//.int int/?)
+ (//.rev rev/?)
+ (//.frac frac/?)
+ (//.text text/?)))
(and (same? bit/0 bit/?)
(same? nat/0 nat/?)
(same? int/0 int/?)
@@ -443,7 +443,7 @@
(in (and (type#= (All (_ a) (-> a .Nat))
:it:)
(case it
- (pattern {//.#Function (list) (//.nat nat/?)})
+ {//.#Function (list) (//.nat nat/?)}
(same? nat/0 nat/?)
_
@@ -464,7 +464,7 @@
(in (and (type#= (All (_ a) (-> a (All (_ b) (-> b .Nat))))
:it:)
(case it
- (pattern {//.#Function (list) {//.#Function (list) (//.nat nat/?)}})
+ {//.#Function (list) {//.#Function (list) (//.nat nat/?)}}
(same? nat/0 nat/?)
_
@@ -485,7 +485,7 @@
(in (and (type#= (All (_ a) (-> a (All (_ b) (-> b b))))
:it:)
(case it
- (pattern {//.#Function (list) {//.#Function (list) (//.local 1)}})
+ {//.#Function (list) {//.#Function (list) (//.local 1)}}
true
_
@@ -504,7 +504,7 @@
(/.phase ..expander archive.empty)
//type.inferring)]
(in (and (case it
- (pattern {//.#Function (list) {//.#Function (list (//.local 1)) (//.foreign 0)}})
+ {//.#Function (list) {//.#Function (list (//.local 1)) (//.foreign 0)}}
true
_
@@ -530,7 +530,7 @@
... (/.phase ..expander archive.empty)
... //type.inferring)]
... (in (case it
- ... (pattern {//.#Function (list) {//.#Function (list) (//.local 0)}})
+ ... {//.#Function (list) {//.#Function (list) (//.local 0)}}
... true
... _
@@ -548,7 +548,7 @@
... (/.phase ..expander archive.empty)
... //type.inferring)]
... (in (case it
- ... (pattern {//.#Function (list) {//.#Function (list (//.local 0)) (//.foreign 0)}})
+ ... {//.#Function (list) {//.#Function (list (//.local 0)) (//.foreign 0)}}
... true
... _
@@ -573,8 +573,8 @@
//type.inferring)]
(in (and (type#= .Bit :it:)
(case it
- (pattern {//.#Apply (//.nat nat/?)
- {//.#Function (list) (//.bit bit/?)}})
+ {//.#Apply (//.nat nat/?)
+ {//.#Function (list) (//.bit bit/?)}}
(and (same? bit/0 bit/?)
(same? nat/0 nat/?))
@@ -594,8 +594,8 @@
//type.inferring)]
(in (and (type#= .Nat :it:)
(case it
- (pattern {//.#Apply (//.nat nat/?)
- {//.#Function (list) (//.local 1)}})
+ {//.#Apply (//.nat nat/?)
+ {//.#Function (list) (//.local 1)}}
(same? nat/0 nat/?)
_
@@ -616,9 +616,9 @@
//type.inferring)]
(in (and (check.subsumes? (All (_ a) (-> a Bit)) :it:)
(case it
- (pattern {//.#Apply (//.nat nat/?)
- {//.#Function (list)
- {//.#Function (list) (//.bit bit/?)}}})
+ {//.#Apply (//.nat nat/?)
+ {//.#Function (list)
+ {//.#Function (list) (//.bit bit/?)}}}
(and (same? bit/0 bit/?)
(same? nat/0 nat/?))
@@ -643,7 +643,7 @@
//type.inferring)]
(in (and (type#= .Text :it:)
(case it
- (pattern {//.#Extension "lux text concat" (list (//.text left) (//.text right))})
+ {//.#Extension "lux text concat" (list (//.text left) (//.text right))}
(and (same? text/0 left)
(same? text/0 right))
@@ -676,10 +676,10 @@
//type.inferring)]
(in (and (type#= .Frac :it:)
(case it
- (pattern {//.#Case (<analysis> input/?)
- [[//.#when (//pattern.bind 0)
- //.#then (//.frac frac/?)]
- (list)]})
+ {//.#Case (<analysis> input/?)
+ [[//.#when (//pattern.bind 0)
+ //.#then (//.frac frac/?)]
+ (list)]}
(and (same? <input> input/?)
(same? frac/0 frac/?))
@@ -701,11 +701,11 @@
//type.inferring)]
(in (and (type#= .Frac :it:)
(case it
- (pattern {//.#Case (<analysis> input/?)
- [[//.#when (<pattern> pattern/?)
- //.#then (//.frac frac/?)]
- (list [//.#when (//pattern.bind 0)
- //.#then (//.frac frac/?)])]})
+ {//.#Case (<analysis> input/?)
+ [[//.#when (<pattern> pattern/?)
+ //.#then (//.frac frac/?)]
+ (list [//.#when (//pattern.bind 0)
+ //.#then (//.frac frac/?)])]}
(and (same? <input> input/?)
(same? <input> pattern/?)
(same? frac/0 frac/?))
@@ -738,11 +738,11 @@
//type.inferring)]
(in (and (type#= .Frac :it:)
(case it
- (pattern {//.#Case (//.bit bit/?)
- [[//.#when (//pattern.bit #0)
- //.#then (//.frac false/?)]
- (list [//.#when (//pattern.bit #1)
- //.#then (//.frac true/?)])]})
+ {//.#Case (//.bit bit/?)
+ [[//.#when (//pattern.bit #0)
+ //.#then (//.frac false/?)]
+ (list [//.#when (//pattern.bit #1)
+ //.#then (//.frac true/?)])]}
(and (same? bit/0 bit/?)
(same? frac/0 false/?)
(same? frac/0 true/?))
@@ -769,11 +769,11 @@
//type.inferring)]
(in (and (type#= .Frac :it:)
(case it
- (pattern {//.#Case (//.variant [<lefts> <right?> (<analysis> analysis/?)])
- [[//.#when (//pattern.variant [<lefts> <right?> (<pattern> pattern/?)])
- //.#then (//.frac match/?)]
- (list [//.#when (//pattern.bind 0)
- //.#then (//.frac mismatch/?)])]})
+ {//.#Case (//.variant [<lefts> <right?> (<analysis> analysis/?)])
+ [[//.#when (//pattern.variant [<lefts> <right?> (<pattern> pattern/?)])
+ //.#then (//.frac match/?)]
+ (list [//.#when (//pattern.bind 0)
+ //.#then (//.frac mismatch/?)])]}
(and (same? <expected> analysis/?)
(same? <expected> pattern/?)
(same? frac/0 match/?)
@@ -808,11 +808,11 @@
//type.inferring)]
(in (and (type#= .Frac :it:)
(case it
- (pattern {//.#Case (//.tuple (list (//.bit bit/?) (//.nat nat/?)))
- [[//.#when (//pattern.tuple (list (//pattern.bit #0) (//pattern.bind 0)))
- //.#then (//.frac false/?)]
- (list [//.#when (//pattern.tuple (list (//pattern.bit #1) (//pattern.bind 0)))
- //.#then (//.frac true/?)])]})
+ {//.#Case (//.tuple (list (//.bit bit/?) (//.nat nat/?)))
+ [[//.#when (//pattern.tuple (list (//pattern.bit #0) (//pattern.bind 0)))
+ //.#then (//.frac false/?)]
+ (list [//.#when (//pattern.tuple (list (//pattern.bit #1) (//pattern.bind 0)))
+ //.#then (//.frac true/?)])]}
(and (same? bit/0 bit/?)
(same? nat/0 nat/?)
(same? frac/0 false/?)
@@ -851,23 +851,23 @@
//type.inferring)]
(in (and (type#= .Frac :it:)
(case it
- (pattern {//.#Case (//.tuple (list (//.unit)
- (//.bit bit/?)
- (//.nat nat/?)
- (//.int int/?)
- (//.rev rev/?)
- (//.frac frac/?)
- (//.text text/?)))
- [[//.#when (//pattern.tuple (list (//pattern.unit)
- (//pattern.bit bit/?')
- (//pattern.nat nat/?')
- (//pattern.int int/?')
- (//pattern.rev rev/?')
- (//pattern.frac frac/?')
- (//pattern.text text/?')))
- //.#then (//.frac match/?)]
- (list [//.#when (//pattern.bind 0)
- //.#then (//.frac mismatch/?)])]})
+ {//.#Case (//.tuple (list (//.unit)
+ (//.bit bit/?)
+ (//.nat nat/?)
+ (//.int int/?)
+ (//.rev rev/?)
+ (//.frac frac/?)
+ (//.text text/?)))
+ [[//.#when (//pattern.tuple (list (//pattern.unit)
+ (//pattern.bit bit/?')
+ (//pattern.nat nat/?')
+ (//pattern.int int/?')
+ (//pattern.rev rev/?')
+ (//pattern.frac frac/?')
+ (//pattern.text text/?')))
+ //.#then (//.frac match/?)]
+ (list [//.#when (//pattern.bind 0)
+ //.#then (//.frac mismatch/?)])]}
(and (same? bit/0 bit/?) (same? bit/0 bit/?')
(same? nat/0 nat/?) (same? nat/0 nat/?')
(same? int/0 int/?) (same? int/0 int/?')
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 2e7b3e031..46232997f 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
@@ -105,10 +105,10 @@
(def (analysed? expected actual)
(-> Code Analysis Bit)
(case [expected actual]
- (pattern [[_ {.#Tuple (list)}] (//analysis.unit)])
+ [[_ {.#Tuple (list)}] (//analysis.unit)]
true
- (pattern [[_ {.#Tuple expected}] (//analysis.tuple actual)])
+ [[_ {.#Tuple expected}] (//analysis.tuple actual)]
(and (n.= (list.size expected)
(list.size actual))
(list.every? (function (_ [expected actual])
@@ -116,7 +116,7 @@
(list.zipped_2 expected actual)))
(^.with_template [<expected> <actual>]
- [(pattern [[_ {<expected> expected}] (<actual> actual)])
+ [[[_ {<expected> expected}] (<actual> actual)]
(same? expected actual)])
([.#Bit //analysis.bit]
[.#Nat //analysis.nat]
@@ -150,7 +150,7 @@
[analysis (|> (/.sum ..analysis lefts right? archive.empty code)
(//type.expecting type))]
(in (case analysis
- (pattern (//analysis.variant [lefts' right?' analysis]))
+ (//analysis.variant [lefts' right?' analysis])
(and (n.= lefts lefts')
(bit#= right? right?')
(..analysed? code analysis))
@@ -169,7 +169,7 @@
analysis (|> (/.sum ..analysis lefts right? archive.empty tagC)
(//type.expecting varT))]
(in (case analysis
- (pattern (//analysis.variant [lefts' right?' it]))
+ (//analysis.variant [lefts' right?' it])
(and (n.= lefts lefts')
(bit#= right? right?')
(..analysed? tagC it))
@@ -242,7 +242,7 @@
analysis (|> (/.variant ..analysis tag archive.empty tagC)
(//type.expecting variantT))]
(in (case analysis
- (pattern (//analysis.variant [lefts' right?' analysis]))
+ (//analysis.variant [lefts' right?' analysis])
(and (n.= lefts lefts')
(bit#= right? right?')
(..analysed? tagC analysis))
@@ -260,7 +260,7 @@
[actualT analysis] (|> (/.variant ..analysis tag archive.empty tagC)
//type.inferring)]
(in (case analysis
- (pattern (//analysis.variant [lefts' right?' analysis]))
+ (//analysis.variant [lefts' right?' analysis])
(and (n.= lefts lefts')
(bit#= right? right?')
(..analysed? tagC analysis)
@@ -307,7 +307,7 @@
(/.product ..analysis archive.empty)
(//type.expecting type))]
(in (case analysis
- (pattern (//analysis.tuple actual))
+ (//analysis.tuple actual)
(and (n.= (list.size expected)
(list.size actual))
(list.every? (function (_ [expected actual])
@@ -332,7 +332,7 @@
(/.product ..analysis archive.empty)
(//type.expecting varT))]
(in (case analysis
- (pattern (//analysis.tuple actual))
+ (//analysis.tuple actual)
(and (n.= (list.size expected)
(list.size actual))
(list.every? (function (_ [expected actual])
@@ -350,7 +350,7 @@
(/.product ..analysis archive.empty)
//type.inferring)]
(in (case analysis
- (pattern (//analysis.tuple actual))
+ (//analysis.tuple actual)
(and (n.= (list.size expected)
(list.size actual))
(list.every? (function (_ [expected actual])
@@ -373,7 +373,7 @@
(list term/0 term/1 term/2 term/2 term/2))))
:inferred: (//type.check (check.clean (list @var) :inferred:))]
(in (case analysis
- (pattern (//analysis.tuple (list analysis/0 analysis/1 (//analysis.tuple (list analysis/2 analysis/3 analysis/4)))))
+ (//analysis.tuple (list analysis/0 analysis/1 (//analysis.tuple (list analysis/2 analysis/3 analysis/4))))
(and (type#= (Tuple type/0 type/1 type/2 type/2 type/2)
:inferred:)
(..analysed? term/0 analysis/0)
@@ -393,7 +393,7 @@
(/.product ..analysis archive.empty)
(//type.expecting (Tuple type/0 type/1 type/2 type/2 type/2)))]
(in (case analysis
- (pattern (//analysis.tuple (list analysis/0 analysis/1 (//analysis.tuple (list analysis/2 analysis/3 analysis/4)))))
+ (//analysis.tuple (list analysis/0 analysis/1 (//analysis.tuple (list analysis/2 analysis/3 analysis/4))))
(and (..analysed? term/0 analysis/0)
(..analysed? term/1 analysis/1)
(..analysed? term/2 analysis/2)
@@ -523,7 +523,7 @@
(|> (/.order false (list))
(//phase.result state)
(pipe.case
- (pattern {try.#Success {.#Some [0 (list) actual_type]}})
+ {try.#Success {.#Some [0 (list) actual_type]}}
(same? .Any actual_type)
_
diff --git a/stdlib/source/test/lux/tool/compiler/language/lux/phase/analysis/reference.lux b/stdlib/source/test/lux/tool/compiler/language/lux/phase/analysis/reference.lux
index d55bc1c2b..e88482764 100644
--- a/stdlib/source/test/lux/tool/compiler/language/lux/phase/analysis/reference.lux
+++ b/stdlib/source/test/lux/tool/compiler/language/lux/phase/analysis/reference.lux
@@ -55,7 +55,7 @@
(//phase.result state)
(try#each (|>> product.right
(pipe.case
- (pattern [actual_type (//analysis.local 0)])
+ [actual_type (//analysis.local 0)]
(type#= expected_type actual_type)
_
@@ -74,7 +74,7 @@
(try#each (|>> product.right
product.right
(pipe.case
- (pattern [actual_type (//analysis.foreign 0)])
+ [actual_type (//analysis.foreign 0)]
(type#= expected_type actual_type)
_
@@ -90,7 +90,7 @@
(//phase.result state)
(try#each (|>> product.right
(pipe.case
- (pattern [actual_type (//analysis.constant [actual_module actual_name])])
+ [actual_type (//analysis.constant [actual_module actual_name])]
(and (type#= expected_type actual_type)
(same? expected_module actual_module)
(same? expected_name actual_name))
@@ -110,7 +110,7 @@
(//phase.result state)
(try#each (|>> product.right
(pipe.case
- (pattern [actual_type (//analysis.constant [actual_module actual_name])])
+ [actual_type (//analysis.constant [actual_module actual_name])]
(and (type#= expected_type actual_type)
(same? import actual_module)
(same? expected_name actual_name))
@@ -131,7 +131,7 @@
(//phase.result state)
(try#each (|>> product.right
(pipe.case
- (pattern [actual_type (//analysis.constant [actual_module actual_name])])
+ [actual_type (//analysis.constant [actual_module actual_name])]
(and (type#= expected_type actual_type)
(same? import actual_module)
(same? expected_name actual_name))
@@ -152,7 +152,7 @@
(//phase.result state)
(try#each (|>> product.right
(pipe.case
- (pattern [actual_type (//analysis.constant [actual_module actual_name])])
+ [actual_type (//analysis.constant [actual_module actual_name])]
(and (type#= .Type actual_type)
(same? expected_module actual_module)
(same? expected_name actual_name))
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 6db157abb..bceb035c6 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
@@ -35,7 +35,7 @@
(/phase.result [/extension.#bundle /extension.empty
/extension.#state state])
(pipe.case
- (pattern {try.#Success analysis})
+ {try.#Success analysis}
(? analysis)
_
@@ -47,7 +47,7 @@
(/phase.result [/extension.#bundle /extension.empty
/extension.#state state])
(pipe.case
- (pattern {try.#Failure error})
+ {try.#Failure error}
true
_
@@ -59,7 +59,7 @@
(/phase.result [/extension.#bundle /extension.empty
/extension.#state state])
(pipe.case
- (pattern {try.#Success [inferred analysis]})
+ {try.#Success [inferred analysis]}
(and (type#= type inferred)
(? analysis))
@@ -71,7 +71,7 @@
[(is (-> <type> Analysis Bit)
(function (_ expected)
(|>> (pipe.case
- (pattern (<tag> actual))
+ (<tag> actual)
(same? expected actual)
_
@@ -88,7 +88,12 @@
(`` (all _.and
(_.coverage [/.unit]
(..analysis state module .Any /.unit
- (|>> (pipe.case (pattern (/analysis.unit)) true _ false))))
+ (|>> (pipe.case
+ (/analysis.unit)
+ true
+
+ _
+ false))))
(,, (with_template [<analysis> <type> <random> <tag>]
[(do !
[sample <random>]
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 ba8a98e65..7f348e194 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
@@ -72,7 +72,7 @@
(//.phase archive.empty)
(phase.result [///bundle.empty synthesis.init])
(pipe.case
- (pattern {try.#Success (synthesis.branch/let [inputS registerS outputS])})
+ {try.#Success (synthesis.branch/let [inputS registerS outputS])}
(and (n.= registerA registerS)
(//primitive.corresponds? inputA inputS)
(//primitive.corresponds? outputA outputS))
@@ -101,7 +101,7 @@
(//.phase archive.empty)
(phase.result [///bundle.empty synthesis.init])
(pipe.case
- (pattern {try.#Success (synthesis.branch/if [inputS thenS elseS])})
+ {try.#Success (synthesis.branch/if [inputS thenS elseS])}
(and (//primitive.corresponds? inputA inputS)
(//primitive.corresponds? thenA thenS)
(//primitive.corresponds? elseA elseS))
@@ -161,7 +161,7 @@
(//.phase archive.empty)
(phase.result [///bundle.empty synthesis.init])
(pipe.case
- (pattern {try.#Success (synthesis.branch/get [pathS recordS])})
+ {try.#Success (synthesis.branch/get [pathS recordS])}
(and (at (list.equivalence (sum.equivalence n.= n.=)) = pathA pathS)
(//primitive.corresponds? recordA recordS))
@@ -189,7 +189,7 @@
(random.set hash 5)
(at random.monad each (|>> set.list
(pipe.case
- (pattern (list s0 s1 s2 s3 s4))
+ (list s0 s1 s2 s3 s4)
[s0 s1 s2 s3 s4]
_
@@ -338,7 +338,7 @@
(|> (/.synthesize_case //.phase archive.empty expected_input match)
(phase.result [///bundle.empty synthesis.init])
(pipe.case
- (pattern {try.#Success (synthesis.branch/case [actual_input actual_path])})
+ {try.#Success (synthesis.branch/case [actual_input actual_path])}
(and (at synthesis.equivalence = expected_input actual_input)
(at synthesis.path_equivalence = expected_path actual_path))
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 10700d853..579f52354 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
@@ -449,7 +449,7 @@
(and (|> (analysis.apply [funcA argsA])
(//.phase archive.empty)
(phase.result [///bundle.empty synthesis.init])
- (!expect (^.multi (pattern {try.#Success (synthesis.function/apply [funcS argsS])})
+ (!expect (^.multi {try.#Success (synthesis.function/apply [funcS argsS])}
(and (//primitive.corresponds? funcA funcS)
(list.every? (product.uncurried //primitive.corresponds?)
(list.zipped_2 argsA argsS))))))
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 40db9835c..76df6ec77 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
@@ -279,8 +279,8 @@
(list#each (|>> {variable.#Local})))
//.#arity arity
//.#body iteration])
- (pattern {.#Some (//.loop/scope [actual_offset actual_inits
- actual])})
+ {.#Some (//.loop/scope [actual_offset actual_inits
+ actual])}
(and (n.= expected_offset
actual_offset)
(at (list.equivalence //.equivalence) =
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 f45fe8dd9..07414ac90 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
@@ -60,8 +60,8 @@
[////analysis.#Text (|>) ////synthesis.#Text (|>)]
))
- (pattern [(////analysis.tuple expected)
- (////synthesis.tuple actual)])
+ [(////analysis.tuple expected)
+ (////synthesis.tuple actual)]
(and (n.= (list.size expected)
(list.size actual))
(list.every? (function (_ [expected actual])
diff --git a/stdlib/source/test/lux/tool/compiler/language/lux/phase/synthesis/structure.lux b/stdlib/source/test/lux/tool/compiler/language/lux/phase/synthesis/structure.lux
index ed3f4cf05..d17044f40 100644
--- a/stdlib/source/test/lux/tool/compiler/language/lux/phase/synthesis/structure.lux
+++ b/stdlib/source/test/lux/tool/compiler/language/lux/phase/synthesis/structure.lux
@@ -49,7 +49,7 @@
(//.phase archive.empty)
(phase.result [///bundle.empty ////synthesis.init])
(pipe.case
- (pattern {try.#Success (////synthesis.variant [leftsS right?S valueS])})
+ {try.#Success (////synthesis.variant [leftsS right?S valueS])}
(let [tagS (if right?S (++ leftsS) leftsS)]
(and (n.= tagA tagS)
(|> tagS (n.= (-- size)) (bit#= right?S))
@@ -68,7 +68,7 @@
(//.phase archive.empty)
(phase.result [///bundle.empty ////synthesis.init])
(pipe.case
- (pattern {try.#Success (////synthesis.tuple membersS)})
+ {try.#Success (////synthesis.tuple membersS)}
(and (n.= size (list.size membersS))
(list.every? (product.uncurried //primitive.corresponds?)
(list.zipped_2 membersA membersS)))
diff --git a/stdlib/source/test/lux/tool/compiler/meta/archive.lux b/stdlib/source/test/lux/tool/compiler/meta/archive.lux
index 12596c093..2ada929d2 100644
--- a/stdlib/source/test/lux/tool/compiler/meta/archive.lux
+++ b/stdlib/source/test/lux/tool/compiler/meta/archive.lux
@@ -150,7 +150,7 @@
archive (/.has module/0 entry archive)]
(in (and (list.empty? pre)
(case (/.entries archive)
- (pattern (list [module/0' @module/0' entry']))
+ (list [module/0' @module/0' entry'])
(and (same? module/0 module/0')
(same? @module/0 @module/0')
(same? entry entry'))
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 2e863466c..ef21f8b7d 100644
--- a/stdlib/source/test/lux/tool/compiler/meta/archive/registry.lux
+++ b/stdlib/source/test/lux/tool/compiler/meta/archive/registry.lux
@@ -70,7 +70,7 @@
(_.coverage [/.resource]
(let [[@it registry] (/.resource mandatory? expected_dependencies /.empty)]
(case (sequence.list (/.artifacts registry))
- (pattern (list [artifact actual_dependencies]))
+ (list [artifact actual_dependencies])
(and (same? @it (the artifact.#id artifact))
(same? mandatory? (the artifact.#mandatory? artifact))
(tagged? category.#Anonymous (the artifact.#category artifact))
@@ -84,13 +84,13 @@
<wrong_expected> <wrong_expected>']
(and (let [[@it registry] (<new> <expected> mandatory? expected_dependencies /.empty)]
(and (case (<query> registry)
- (pattern (list actual_name))
+ (list actual_name)
(same? <expected> actual_name)
_
false)
(case (sequence.list (/.artifacts registry))
- (pattern (list [artifact actual_dependencies]))
+ (list [artifact actual_dependencies])
(and (same? @it (the artifact.#id artifact))
(same? mandatory? (the artifact.#mandatory? artifact))
(case (the artifact.#category artifact)
@@ -105,7 +105,7 @@
false)))
(let [[@it registry] (<wrong_new> <wrong_expected> mandatory? expected_dependencies /.empty)]
(case (<query> registry)
- (pattern (list))
+ (list)
true
_
diff --git a/stdlib/source/test/lux/tool/compiler/meta/export.lux b/stdlib/source/test/lux/tool/compiler/meta/export.lux
index 07c9affa7..d9fb14ace 100644
--- a/stdlib/source/test/lux/tool/compiler/meta/export.lux
+++ b/stdlib/source/test/lux/tool/compiler/meta/export.lux
@@ -79,8 +79,8 @@
(try#each (|>> product.left
sequence.list
(pipe.case
- (pattern (list {tar.#Normal [actual_path/0 when/0 mode/0 ownership/0 actual_content/0]}
- {tar.#Normal [actual_path/1 when/1 mode/1 ownership/1 actual_content/1]}))
+ (list {tar.#Normal [actual_path/0 when/0 mode/0 ownership/0 actual_content/0]}
+ {tar.#Normal [actual_path/1 when/1 mode/1 ownership/1 actual_content/1]})
(with_expansions [<test> (and (and (text#= file/0' (tar.from_path actual_path/0))
(same? /.mode mode/0)
(same? /.ownership ownership/0)
@@ -102,8 +102,8 @@
(try#each (|>> product.right
sequence.list
(pipe.case
- (pattern (list {tar.#Normal [actual_path/0 _ _ _ actual_content/0]}
- {tar.#Normal [actual_path/1 _ _ _ actual_content/1]}))
+ (list {tar.#Normal [actual_path/0 _ _ _ actual_content/0]}
+ {tar.#Normal [actual_path/1 _ _ _ actual_content/1]})
(with_expansions [<test> (and (and (text#= file/0' (tar.from_path actual_path/0))
(binary#= content/0 (tar.data actual_content/0)))
(and (text#= file/1' (tar.from_path actual_path/1))
diff --git a/stdlib/source/test/lux/tool/compiler/reference.lux b/stdlib/source/test/lux/tool/compiler/reference.lux
index 9204b53a8..6f247179c 100644
--- a/stdlib/source/test/lux/tool/compiler/reference.lux
+++ b/stdlib/source/test/lux/tool/compiler/reference.lux
@@ -52,7 +52,7 @@
(,, (with_template [<tag>]
[(_.coverage [<tag>]
(case (<tag> expected_register)
- (pattern (<tag> actual_register))
+ (<tag> actual_register)
(n.= expected_register actual_register)
_
@@ -65,20 +65,20 @@
(_.coverage [/.variable /.self]
(and (at /.equivalence = (/.self) (/.variable (variable.self)))
(case (/.self)
- (pattern (/.self))
+ (/.self)
true
_
false)
(case (/.variable (variable.self))
- (pattern (/.self))
+ (/.self)
true
_
false)))
(_.coverage [/.constant]
(case (/.constant expected_constant)
- (pattern (/.constant actual_constant))
+ (/.constant actual_constant)
(symbol#= expected_constant actual_constant)
_
diff --git a/stdlib/source/test/lux/tool/compiler/reference/variable.lux b/stdlib/source/test/lux/tool/compiler/reference/variable.lux
index 8036cab58..f2b219b86 100644
--- a/stdlib/source/test/lux/tool/compiler/reference/variable.lux
+++ b/stdlib/source/test/lux/tool/compiler/reference/variable.lux
@@ -34,7 +34,7 @@
($hash.spec /.hash ..random))
(_.coverage [/.self]
(case (/.self)
- (pattern (/.self)) true
+ (/.self) true
_ false))
(_.coverage [/.self?]
(/.self? (/.self)))
diff --git a/stdlib/source/test/lux/world/file/watch.lux b/stdlib/source/test/lux/world/file/watch.lux
index 6179b2164..9977934a0 100644
--- a/stdlib/source/test/lux/world/file/watch.lux
+++ b/stdlib/source/test/lux/world/file/watch.lux
@@ -105,7 +105,7 @@
poll/pre (at watcher poll [])
poll/post (at watcher poll [])]
(in (and (case poll/pre
- (pattern (list [concern actual_path]))
+ (list [concern actual_path])
(and (text#= expected_path actual_path)
(and (/.creation? concern)
(not (/.modification? concern))
@@ -123,7 +123,7 @@
poll/2 (at watcher poll [])
poll/2' (at watcher poll [])]
(in (and (case poll/2
- (pattern (list [concern actual_path]))
+ (list [concern actual_path])
(and (text#= expected_path actual_path)
(and (not (/.creation? concern))
(/.modification? concern)
@@ -140,7 +140,7 @@
poll/3 (at watcher poll [])
poll/3' (at watcher poll [])]
(in (and (case poll/3
- (pattern (list [concern actual_path]))
+ (list [concern actual_path])
(and (not (/.creation? concern))
(not (/.modification? concern))
(/.deletion? concern))