diff options
Diffstat (limited to 'stdlib/source/test')
35 files changed, 74 insertions, 65 deletions
diff --git a/stdlib/source/test/lux.lux b/stdlib/source/test/lux.lux index af6864ce3..04f893c8f 100644 --- a/stdlib/source/test/lux.lux +++ b/stdlib/source/test/lux.lux @@ -58,7 +58,6 @@ ["[1][0]" time] ["[1][0]" tool] - ["[1][0]" type] ["[1][0]" world] ["[1][0]" ffi] @@ -1224,7 +1223,6 @@ /time.test /tool.test - /type.test /world.test /ffi.test diff --git a/stdlib/source/test/lux/control/concurrency/frp.lux b/stdlib/source/test/lux/control/concurrency/frp.lux index 232e483d7..8a279bac2 100644 --- a/stdlib/source/test/lux/control/concurrency/frp.lux +++ b/stdlib/source/test/lux/control/concurrency/frp.lux @@ -20,8 +20,9 @@ ["[0]" random] [number ["n" nat]]] - [type - ["[0]" variance]]]] + [meta + [type + ["[0]" variance]]]]] [\\library ["[0]" / (.only) [// diff --git a/stdlib/source/test/lux/control/concurrency/semaphore.lux b/stdlib/source/test/lux/control/concurrency/semaphore.lux index eeaac1f53..4bae6dd3f 100644 --- a/stdlib/source/test/lux/control/concurrency/semaphore.lux +++ b/stdlib/source/test/lux/control/concurrency/semaphore.lux @@ -24,8 +24,9 @@ [number ["n" nat] ["[0]" i64]]] - [type - ["[0]" refinement]]]] + [meta + [type + ["[0]" refinement]]]]] [\\library ["[0]" /]]) diff --git a/stdlib/source/test/lux/control/region.lux b/stdlib/source/test/lux/control/region.lux index 54dde9289..e0ef106a2 100644 --- a/stdlib/source/test/lux/control/region.lux +++ b/stdlib/source/test/lux/control/region.lux @@ -1,7 +1,6 @@ (.require [library [lux (.except) - [type (.only sharing)] ["_" test (.only Test)] [abstract [equivalence (.only Equivalence)] @@ -21,7 +20,9 @@ [math ["[0]" random] [number - ["n" nat]]]]] + ["n" nat]]] + [meta + [type (.only sharing)]]]] [\\library ["[0]" / (.only Region) [// diff --git a/stdlib/source/test/lux/data/binary.lux b/stdlib/source/test/lux/data/binary.lux index 52fa6519a..5bd685351 100644 --- a/stdlib/source/test/lux/data/binary.lux +++ b/stdlib/source/test/lux/data/binary.lux @@ -3,7 +3,6 @@ [lux (.except) [ffi (.only)] ["_" test (.only Test)] - ["[0]" type] [abstract [equivalence (.only Equivalence)] ["[0]" monad (.only do)] @@ -44,7 +43,8 @@ ["[0]" rev] ["[0]" frac]]] [meta - ["[0]" symbol]]]] + ["[0]" symbol] + ["[0]" type]]]] [\\library ["[0]" / (.only) (.use "[1]#[0]" equivalence) ["!" \\unsafe] diff --git a/stdlib/source/test/lux/data/collection/tree/finger.lux b/stdlib/source/test/lux/data/collection/tree/finger.lux index 2f9e4c374..7d9faf595 100644 --- a/stdlib/source/test/lux/data/collection/tree/finger.lux +++ b/stdlib/source/test/lux/data/collection/tree/finger.lux @@ -14,7 +14,8 @@ ["[0]" random] [number ["n" nat]]] - [type (.only by_example)]]] + [meta + [type (.only by_example)]]]] [\\library ["[0]" /]]) diff --git a/stdlib/source/test/lux/data/format/json.lux b/stdlib/source/test/lux/data/format/json.lux index 7be586b4f..75d616037 100644 --- a/stdlib/source/test/lux/data/format/json.lux +++ b/stdlib/source/test/lux/data/format/json.lux @@ -3,7 +3,6 @@ [lux (.except Variant Record) ["_" test (.only Test)] ["@" target] - ["[0]" meta] [abstract [codec (.except)] [monad (.only do)] @@ -43,8 +42,9 @@ ["[0]/[1]" \\test]] ["[0]" duration ["[0]/[1]" \\test]]] - [type - ["[0]" unit]]]] + ["[0]" meta (.only) + [type + ["[0]" unit]]]]] ["[0]" \\polytypic] ["[0]" \\parser] [\\library diff --git a/stdlib/source/test/lux/data/format/xml.lux b/stdlib/source/test/lux/data/format/xml.lux index 53f9346c0..a01fab3e8 100644 --- a/stdlib/source/test/lux/data/format/xml.lux +++ b/stdlib/source/test/lux/data/format/xml.lux @@ -2,7 +2,6 @@ [library [lux (.except char symbol) ["_" test (.only Test)] - ["[0]" type (.use "[1]#[0]" equivalence)] [abstract [monad (.only do)] [\\specification @@ -27,7 +26,8 @@ [number ["n" nat]]] [meta - ["[0]" symbol (.use "[1]#[0]" equivalence)]]]] + ["[0]" symbol (.use "[1]#[0]" equivalence)] + ["[0]" type (.use "[1]#[0]" equivalence)]]]] ["[0]" \\parser] [\\library ["[0]" / (.use "[1]#[0]" equivalence)]]) diff --git a/stdlib/source/test/lux/data/text.lux b/stdlib/source/test/lux/data/text.lux index 0f7e49f03..ca4866bc4 100644 --- a/stdlib/source/test/lux/data/text.lux +++ b/stdlib/source/test/lux/data/text.lux @@ -2,7 +2,6 @@ [library [lux (.except char) ["_" test (.only Test)] - ["[0]" type] [abstract [monad (.only do)] [equivalence (.only Equivalence)] @@ -50,7 +49,8 @@ ["[0]" ratio]]] [meta ["[0]" location] - ["[0]" symbol]] + ["[0]" symbol] + ["[0]" type]] ["[0]" time (.only) ["[0]" day] ["[0]" month] @@ -62,11 +62,11 @@ ["[1][0]" xml] ["[1][0]" json]] [// - ["[1][0]" type] [macro ["[1][0]" code]] [meta - ["[1][0]" symbol]]]] + ["[1][0]" symbol] + ["[1][0]" type]]]] ["[0]" / ["[1][0]" buffer] ["[1][0]" encoding] diff --git a/stdlib/source/test/lux/debug.lux b/stdlib/source/test/lux/debug.lux index 978f42916..d85343bc9 100644 --- a/stdlib/source/test/lux/debug.lux +++ b/stdlib/source/test/lux/debug.lux @@ -33,7 +33,6 @@ [\\library ["[0]" /]] ["$[0]" // - ["[1][0]" type] [data [format ["[1][0]" json] @@ -45,7 +44,8 @@ ["[1][0]" ratio]]] [meta ["[1][0]" location] - ["[1][0]" symbol]]]) + ["[1][0]" symbol] + ["[1][0]" type]]]) (def can_represent_simple_types (Random Bit) diff --git a/stdlib/source/test/lux/ffi.jvm.lux b/stdlib/source/test/lux/ffi.jvm.lux index 581d89f2d..13c9f2fcd 100644 --- a/stdlib/source/test/lux/ffi.jvm.lux +++ b/stdlib/source/test/lux/ffi.jvm.lux @@ -2,8 +2,6 @@ [library [lux (.except) ["_" test (.only Test)] - ["[0]" type (.use "[1]#[0]" equivalence)] - ["[0]" meta] ["[0]" debug] ["[0]" static] [abstract @@ -31,6 +29,8 @@ ["n" nat] ["i" int (.use "[1]#[0]" equivalence)] ["f" frac (.use "[1]#[0]" equivalence)]]] + ["[0]" meta (.only) + ["[0]" type (.use "[1]#[0]" equivalence)]] [target ["[0]" jvm ["[1]" type (.use "[1]#[0]" equivalence)]]]]] diff --git a/stdlib/source/test/lux/math/modular.lux b/stdlib/source/test/lux/math/modular.lux index c3a1b8f53..60734f83d 100644 --- a/stdlib/source/test/lux/math/modular.lux +++ b/stdlib/source/test/lux/math/modular.lux @@ -2,7 +2,6 @@ [library [lux (.except) ["_" test (.only Test)] - ["[0]" type (.use "[1]#[0]" equivalence)] [abstract [monad (.only do)] [\\specification @@ -21,7 +20,9 @@ [math ["[0]" random (.only Random)] [number - ["i" int]]]]] + ["i" int]]] + [meta + ["[0]" type (.use "[1]#[0]" equivalence)]]]] ["$[0]" // ["[1]" modulus]] [\\library diff --git a/stdlib/source/test/lux/meta.lux b/stdlib/source/test/lux/meta.lux index 51b89ebfc..e5166d7ee 100644 --- a/stdlib/source/test/lux/meta.lux +++ b/stdlib/source/test/lux/meta.lux @@ -2,7 +2,6 @@ [library [lux (.except) ["_" test (.only Test)] - ["[0]" type (.use "[1]#[0]" equivalence)] [abstract [equivalence (.only Equivalence)] [monad (.only do)] @@ -31,12 +30,14 @@ ["[0]" location] ["[0]" symbol (.use "[1]#[0]" equivalence)]]]] [\\library - ["[0]" /]] + ["[0]" / (.only) + ["[0]" type (.use "[1]#[0]" equivalence)]]] ["[0]" / ["[1][0]" location] ["[1][0]" symbol] ["[1][0]" configuration] - ["[1][0]" version]]) + ["[1][0]" version] + ["[1][0]" type]]) (def !expect (template (_ <pattern> <value>) @@ -1020,4 +1021,5 @@ /symbol.test /configuration.test /version.test + /type.test ))) diff --git a/stdlib/source/test/lux/type.lux b/stdlib/source/test/lux/meta/type.lux index 9f753b1d0..9f753b1d0 100644 --- a/stdlib/source/test/lux/type.lux +++ b/stdlib/source/test/lux/meta/type.lux diff --git a/stdlib/source/test/lux/type/check.lux b/stdlib/source/test/lux/meta/type/check.lux index 89aa98285..b630d37a1 100644 --- a/stdlib/source/test/lux/type/check.lux +++ b/stdlib/source/test/lux/meta/type/check.lux @@ -2,7 +2,6 @@ [library [lux (.except symbol type) ["_" test (.only Test)] - ["[0]" type (.use "[1]#[0]" equivalence)] [abstract ["[0]" monad (.only do)] [\\specification @@ -29,7 +28,8 @@ [number ["n" nat]]]]] [\\library - ["[0]" /]]) + ["[0]" / (.only) + ["/[1]" // (.use "[1]#[0]" equivalence)]]]) ... TODO: Remove the following 3 definitions ASAP. //.type already exists... (def short @@ -203,7 +203,7 @@ (case (/.result /.fresh_context (do /.monad [[var_id var_type] /.var] - (in (type#= var_type {.#Var var_id})))) + (in (//#= var_type {.#Var var_id})))) {try.#Success verdict} verdict {try.#Failure error} false)) (do random.monad @@ -663,7 +663,7 @@ (do [! random.monad] [nominal ..nominal [name/0 name/1] (..non_twins text#= (random.upper_case 10)) - [parameter/0 parameter/1] (..non_twins type#= ..nominal) + [parameter/0 parameter/1] (..non_twins //#= ..nominal) left_name ..symbol right_name ..symbol ring_tail_size (at ! each (n.% 10) random.nat)] @@ -734,8 +734,8 @@ (and (|> (do /.monad [[var_id varT] /.var cleanedT (/.clean (list) (type_shape varT))] - (in (type#= (type_shape varT) - cleanedT))) + (in (//#= (type_shape varT) + cleanedT))) (/.result /.fresh_context) (try.else false)) (|> (do /.monad @@ -743,8 +743,8 @@ [_ replacementT] /.existential _ (/.check varT replacementT) cleanedT (/.clean (list) (type_shape varT))] - (in (type#= (type_shape replacementT) - cleanedT))) + (in (//#= (type_shape replacementT) + cleanedT))) (/.result /.fresh_context) (try.else false)) )))) diff --git a/stdlib/source/test/lux/type/dynamic.lux b/stdlib/source/test/lux/meta/type/dynamic.lux index 595a1da05..595a1da05 100644 --- a/stdlib/source/test/lux/type/dynamic.lux +++ b/stdlib/source/test/lux/meta/type/dynamic.lux diff --git a/stdlib/source/test/lux/type/implicit.lux b/stdlib/source/test/lux/meta/type/implicit.lux index 299ae7464..299ae7464 100644 --- a/stdlib/source/test/lux/type/implicit.lux +++ b/stdlib/source/test/lux/meta/type/implicit.lux diff --git a/stdlib/source/test/lux/type/primitive.lux b/stdlib/source/test/lux/meta/type/primitive.lux index 7b4500c00..7b4500c00 100644 --- a/stdlib/source/test/lux/type/primitive.lux +++ b/stdlib/source/test/lux/meta/type/primitive.lux diff --git a/stdlib/source/test/lux/type/quotient.lux b/stdlib/source/test/lux/meta/type/quotient.lux index 72d39b19d..72d39b19d 100644 --- a/stdlib/source/test/lux/type/quotient.lux +++ b/stdlib/source/test/lux/meta/type/quotient.lux diff --git a/stdlib/source/test/lux/type/refinement.lux b/stdlib/source/test/lux/meta/type/refinement.lux index 711d0401f..711d0401f 100644 --- a/stdlib/source/test/lux/type/refinement.lux +++ b/stdlib/source/test/lux/meta/type/refinement.lux diff --git a/stdlib/source/test/lux/type/resource.lux b/stdlib/source/test/lux/meta/type/resource.lux index a23f1cacf..a23f1cacf 100644 --- a/stdlib/source/test/lux/type/resource.lux +++ b/stdlib/source/test/lux/meta/type/resource.lux diff --git a/stdlib/source/test/lux/type/unit.lux b/stdlib/source/test/lux/meta/type/unit.lux index b52ddd921..b52ddd921 100644 --- a/stdlib/source/test/lux/type/unit.lux +++ b/stdlib/source/test/lux/meta/type/unit.lux diff --git a/stdlib/source/test/lux/type/unit/scale.lux b/stdlib/source/test/lux/meta/type/unit/scale.lux index adc3523b5..adc3523b5 100644 --- a/stdlib/source/test/lux/type/unit/scale.lux +++ b/stdlib/source/test/lux/meta/type/unit/scale.lux diff --git a/stdlib/source/test/lux/type/variance.lux b/stdlib/source/test/lux/meta/type/variance.lux index 911c68067..911c68067 100644 --- a/stdlib/source/test/lux/type/variance.lux +++ b/stdlib/source/test/lux/meta/type/variance.lux 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 d862aaf5e..987a00507 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 @@ -24,9 +24,9 @@ ["[0]" symbol ["$[1]" \\test]] ["[0]" configuration - ["$[1]" \\test]]] - ["[0]" type (.use "[1]#[0]" equivalence) - ["[0]" check (.only Check)]]]] + ["$[1]" \\test]] + ["[0]" type (.use "[1]#[0]" equivalence) + ["[0]" check (.only Check)]]]]] [\\library ["[0]" / (.only) ["/[1]" // (.only) 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 8959c72c9..5fb2ad044 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 @@ -17,8 +17,9 @@ ["[0]" random (.only Random)] [number ["n" nat]]] - ["[0]" type - ["$[1]" \\test]]]] + [meta + ["[0]" type + ["$[1]" \\test]]]]] [\\library ["[0]" / (.only) ["/[1]" // (.only) diff --git a/stdlib/source/test/lux/tool/compiler/language/lux/analysis/type.lux b/stdlib/source/test/lux/tool/compiler/language/lux/analysis/type.lux index b67b6bd4a..805939c68 100644 --- a/stdlib/source/test/lux/tool/compiler/language/lux/analysis/type.lux +++ b/stdlib/source/test/lux/tool/compiler/language/lux/analysis/type.lux @@ -13,9 +13,9 @@ ["[0]" random (.only Random)]] [meta ["[0]" configuration - ["$[1]" \\test]]] - ["[0]" type (.use "[1]#[0]" equivalence) - ["[0]" check]]]] + ["$[1]" \\test]] + ["[0]" type (.use "[1]#[0]" equivalence) + ["[0]" check]]]]] [\\library ["[0]" / (.only) ["/[1]" // (.only) 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 8e4113010..3c0823345 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 @@ -18,8 +18,9 @@ ["[0]" random] [number ["n" nat]]] - ["[0]" type (.use "[1]#[0]" equivalence) - ["[0]" check]]]] + [meta + ["[0]" type (.use "[1]#[0]" equivalence) + ["[0]" check]]]]] [\\library ["[0]" / (.only) [// diff --git a/stdlib/source/test/lux/tool/compiler/language/lux/phase/analysis/case.lux b/stdlib/source/test/lux/tool/compiler/language/lux/phase/analysis/case.lux index 8f58207b2..e5254f4b4 100644 --- a/stdlib/source/test/lux/tool/compiler/language/lux/phase/analysis/case.lux +++ b/stdlib/source/test/lux/tool/compiler/language/lux/phase/analysis/case.lux @@ -15,8 +15,9 @@ ["[0]" code]] [math ["[0]" random]] - ["[0]" type (.use "[1]#[0]" equivalence) - ["[0]" check]]]] + [meta + ["[0]" type (.use "[1]#[0]" equivalence) + ["[0]" check]]]]] [\\library ["[0]" / (.only) ["/[1]" // (.only) 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 0454ecfb0..31e3355f2 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 @@ -29,9 +29,9 @@ ["[0]" symbol (.only) ["$[1]" \\test]] ["[0]" configuration - ["$[1]" \\test]]] - ["[0]" type (.use "[1]#[0]" equivalence) - ["[0]" check]]]] + ["$[1]" \\test]] + ["[0]" type (.use "[1]#[0]" equivalence) + ["[0]" check]]]]] [\\library ["[0]" / (.only) ["/[1]" // (.only) diff --git a/stdlib/source/test/lux/tool/compiler/language/lux/phase/analysis/function.lux b/stdlib/source/test/lux/tool/compiler/language/lux/phase/analysis/function.lux index 16b3e1b60..1a865d0d6 100644 --- a/stdlib/source/test/lux/tool/compiler/language/lux/phase/analysis/function.lux +++ b/stdlib/source/test/lux/tool/compiler/language/lux/phase/analysis/function.lux @@ -22,10 +22,10 @@ ["n" nat]]] [meta ["[0]" symbol - ["$[1]" \\test]]] - ["[0]" type (.use "[1]#[0]" equivalence) - ["$[1]" \\test] - ["[0]" check]]]] + ["$[1]" \\test]] + ["[0]" type (.use "[1]#[0]" equivalence) + ["$[1]" \\test] + ["[0]" check]]]]] [\\library ["[0]" / (.only) ["/[1]" // (.only) 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 fd64eff38..d55bc1c2b 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 @@ -13,8 +13,9 @@ ["[0]" text]] [math ["[0]" random]] - ["[0]" type (.use "[1]#[0]" equivalence) - ["$[1]" \\test]]]] + [meta + ["[0]" type (.use "[1]#[0]" equivalence) + ["$[1]" \\test]]]]] [\\library ["[0]" / (.only) ["/[1]" // 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 ebc162c9e..5f7769239 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 @@ -2,7 +2,6 @@ [library [lux (.except) ["_" test (.only Test)] - ["[0]" type (.use "[1]#[0]" equivalence)] [abstract [monad (.only do)]] [control @@ -13,6 +12,7 @@ [math ["[0]" random]] [meta + ["[0]" type (.use "[1]#[0]" equivalence)] ["[0]" configuration ["$[1]" \\test]]]]] [\\library @@ -88,13 +88,13 @@ (`` (all _.and (_.coverage [/.unit] (..analysis state module .Any /.unit - (|>> (pipe.case (pattern (/analysis.unit)) true _ false)))) + (|>> (pipe.case (pattern (/analysis.unit)) true _ false)))) (~~ (with_template [<analysis> <type> <random> <tag>] [(do ! [sample <random>] (_.coverage [<analysis>] (..analysis state module <type> (<analysis> sample) - ((..analysis? <type> <tag>) sample))))] + ((..analysis? <type> <tag>) sample))))] [/.bit .Bit random.bit /analysis.bit] [/.nat .Nat random.nat /analysis.nat] 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 19d27a9b6..7507a6da6 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 @@ -14,11 +14,11 @@ ["[0]" atom]]] [data ["[0]" product]] - ["[0]" type (.use "[1]#[0]" equivalence)] [macro ["[0]" code]] [meta - ["[0]" symbol]]] + ["[0]" symbol] + ["[0]" type (.use "[1]#[0]" equivalence)]]] [//// [analysis ["_[0]" primitive]]] diff --git a/stdlib/source/test/lux/world/file/watch.lux b/stdlib/source/test/lux/world/file/watch.lux index 36f1f444b..6179b2164 100644 --- a/stdlib/source/test/lux/world/file/watch.lux +++ b/stdlib/source/test/lux/world/file/watch.lux @@ -55,8 +55,8 @@ ..concern) .let [[left left?] left [right right?] right]] - (_.coverage [/.also] - (let [composition (/.also left right)] + (_.coverage [/.and] + (let [composition (/.and left right)] (and (left? composition) (right? composition))))) (_.coverage [/.all] |