aboutsummaryrefslogtreecommitdiff
path: root/stdlib/source/test/lux/tool/compiler/phase/analysis
diff options
context:
space:
mode:
Diffstat (limited to 'stdlib/source/test/lux/tool/compiler/phase/analysis')
-rw-r--r--stdlib/source/test/lux/tool/compiler/phase/analysis/case.lux2
-rw-r--r--stdlib/source/test/lux/tool/compiler/phase/analysis/function.lux6
-rw-r--r--stdlib/source/test/lux/tool/compiler/phase/analysis/primitive.lux10
-rw-r--r--stdlib/source/test/lux/tool/compiler/phase/analysis/reference.lux1
-rw-r--r--stdlib/source/test/lux/tool/compiler/phase/analysis/structure.lux10
5 files changed, 14 insertions, 15 deletions
diff --git a/stdlib/source/test/lux/tool/compiler/phase/analysis/case.lux b/stdlib/source/test/lux/tool/compiler/phase/analysis/case.lux
index 6f5a324cd..30b446bb5 100644
--- a/stdlib/source/test/lux/tool/compiler/phase/analysis/case.lux
+++ b/stdlib/source/test/lux/tool/compiler/phase/analysis/case.lux
@@ -2,7 +2,7 @@
[lux #*
[abstract ["." monad (#+ do)]]
[data
- text/format
+ ["%" text/format (#+ format)]
["." name ("#@." equivalence)]]
["r" math/random (#+ Random) ("#@." monad)]
["_" test (#+ Test)]
diff --git a/stdlib/source/test/lux/tool/compiler/phase/analysis/function.lux b/stdlib/source/test/lux/tool/compiler/phase/analysis/function.lux
index 252344cb6..08346c47b 100644
--- a/stdlib/source/test/lux/tool/compiler/phase/analysis/function.lux
+++ b/stdlib/source/test/lux/tool/compiler/phase/analysis/function.lux
@@ -2,7 +2,7 @@
[lux #*
[abstract ["." monad (#+ do)]]
[data
- text/format
+ ["%" text/format (#+ format)]
["." name ("#@." equivalence)]]
["r" math/random (#+ Random) ("#@." monad)]
["_" test (#+ Test)]
@@ -50,7 +50,7 @@
[outputT outputC] _primitive.primitive
[inputT _] _primitive.primitive
#let [g!arg (code.local-identifier arg-name)]]
- (<| (_.context (%name (name-of /.function)))
+ (<| (_.context (%.name (name-of /.function)))
($_ _.and
(_.test "Can analyse function."
(and (|> (//type.with-type (All [a] (-> a outputT))
@@ -97,7 +97,7 @@
(type.function (#.Cons varT partial-poly-inputsT))
varT)
dummy-function (#////analysis.Function (list) (#////analysis.Reference (////reference.local 1)))]]
- (<| (_.context (%name (name-of /.apply)))
+ (<| (_.context (%.name (name-of /.apply)))
($_ _.and
(_.test "Can analyse monomorphic type application."
(|> (/.apply _primitive.phase funcT dummy-function (' []) inputsC)
diff --git a/stdlib/source/test/lux/tool/compiler/phase/analysis/primitive.lux b/stdlib/source/test/lux/tool/compiler/phase/analysis/primitive.lux
index 0b3990cf0..1a7aec26f 100644
--- a/stdlib/source/test/lux/tool/compiler/phase/analysis/primitive.lux
+++ b/stdlib/source/test/lux/tool/compiler/phase/analysis/primitive.lux
@@ -3,7 +3,7 @@
["@" target]
[abstract ["." monad (#+ do)]]
[data
- text/format
+ ["%" text/format (#+ format)]
["." name]]
["r" math/random (#+ Random) ("#@." monad)]
["_" test (#+ Test)]
@@ -65,8 +65,8 @@
(exception: (wrong-inference {expected Type} {inferred Type})
(exception.report
- ["Expected" (%type expected)]
- ["Inferred" (%type inferred)]))
+ ["Expected" (%.type expected)]
+ ["Inferred" (%.type inferred)]))
(def: (infer expected-type analysis)
(-> Type (Operation Analysis) (Error Analysis))
@@ -84,7 +84,7 @@
(def: #export test
(<| (_.context (name.module (name-of /._)))
(`` ($_ _.and
- (_.test (%name (name-of #////analysis.Unit))
+ (_.test (%.name (name-of #////analysis.Unit))
(|> (infer Any (..phase (' [])))
(case> (^ (#error.Success (#////analysis.Primitive (#////analysis.Unit output))))
(is? [] output)
@@ -94,7 +94,7 @@
(~~ (template [<type> <tag> <random> <constructor>]
[(do r.monad
[sample <random>]
- (_.test (%name (name-of <tag>))
+ (_.test (%.name (name-of <tag>))
(|> (infer <type> (..phase (<constructor> sample)))
(case> (#error.Success (#////analysis.Primitive (<tag> output)))
(is? sample output)
diff --git a/stdlib/source/test/lux/tool/compiler/phase/analysis/reference.lux b/stdlib/source/test/lux/tool/compiler/phase/analysis/reference.lux
index 842c23950..427e0dc2c 100644
--- a/stdlib/source/test/lux/tool/compiler/phase/analysis/reference.lux
+++ b/stdlib/source/test/lux/tool/compiler/phase/analysis/reference.lux
@@ -2,7 +2,6 @@
[lux #*
[abstract ["." monad (#+ do)]]
[data
- text/format
["." name ("#@." equivalence)]]
["r" math/random (#+ Random) ("#@." monad)]
["_" test (#+ Test)]
diff --git a/stdlib/source/test/lux/tool/compiler/phase/analysis/structure.lux b/stdlib/source/test/lux/tool/compiler/phase/analysis/structure.lux
index 7c7e9e52c..156965a55 100644
--- a/stdlib/source/test/lux/tool/compiler/phase/analysis/structure.lux
+++ b/stdlib/source/test/lux/tool/compiler/phase/analysis/structure.lux
@@ -2,7 +2,7 @@
[lux #*
[abstract ["." monad (#+ do)]]
[data
- text/format
+ ["%" text/format (#+ format)]
["." name]]
["r" math/random (#+ Random) ("#@." monad)]
["_" test (#+ Test)]
@@ -125,7 +125,7 @@
(list.drop choice primitives)))
[+valueT +valueC] (maybe.assume (list.nth +choice +primitives))
+variantT (type.variant (list@map product.left +primitives))]]
- (<| (_.context (%name (name-of /.sum)))
+ (<| (_.context (%.name (name-of /.sum)))
($_ _.and
(_.test "Can analyse."
(check-sum variantT choice size
@@ -174,7 +174,7 @@
(list [(#.Parameter 1) +valueC])
(list.drop choice primitives)))
+tupleT (type.tuple (list@map product.left +primitives))]]
- (<| (_.context (%name (name-of /.product)))
+ (<| (_.context (%.name (name-of /.product)))
($_ _.and
(_.test "Can analyse."
(|> (//type.with-type tupleT
@@ -243,7 +243,7 @@
(type.univ-q 1))
choice-tag (maybe.assume (list.nth choice tags))
other-choice-tag (maybe.assume (list.nth other-choice tags))]]
- (<| (_.context (%name (name-of /.tagged-sum)))
+ (<| (_.context (%.name (name-of /.tagged-sum)))
($_ _.and
(_.test "Can infer."
(|> (/.tagged-sum _primitive.phase [module-name choice-tag] choiceC)
@@ -287,7 +287,7 @@
(list.drop (inc choice) primitivesT))))
(type.univ-q 1)
(#.Named [module-name type-name]))]]
- (<| (_.context (%name (name-of /.record)))
+ (<| (_.context (%.name (name-of /.record)))
(_.test "Can infer."
(|> (/.record _primitive.phase recordC)
(check-record module-name tags monoT monoT size))))))