diff options
Diffstat (limited to 'stdlib/source/test/lux')
17 files changed, 235 insertions, 234 deletions
diff --git a/stdlib/source/test/lux/control/concurrency/actor.lux b/stdlib/source/test/lux/control/concurrency/actor.lux index a5c090476..ecdeb98dc 100644 --- a/stdlib/source/test/lux/control/concurrency/actor.lux +++ b/stdlib/source/test/lux/control/concurrency/actor.lux @@ -89,7 +89,7 @@ (in (do async.monad [_ (async.future (do io.monad [actor (/.spawn! (: (/.Behavior Any Any) - {#/.on_init (|>>) + [#/.on_init (|>>) #/.on_mail (function (_ message state self) (do {! async.monad} [outcome (message state self)] @@ -100,7 +100,7 @@ (in outcome)) (#try.Success _) - (in outcome))))}) + (in outcome))))]) [])] (/.poison! actor))) _ (async.delay 100) diff --git a/stdlib/source/test/lux/data/collection/tree.lux b/stdlib/source/test/lux/data/collection/tree.lux index 35b43bb9b..826e2500d 100644 --- a/stdlib/source/test/lux/data/collection/tree.lux +++ b/stdlib/source/test/lux/data/collection/tree.lux @@ -28,8 +28,8 @@ (in [(|> children (list\each product.left) (list\mix n.+ 1)) - {#/.value value - #/.children (list\each product.right children)}]))) + [#/.value value + #/.children (list\each product.right children)]]))) (def: .public test Test diff --git a/stdlib/source/test/lux/data/format/tar.lux b/stdlib/source/test/lux/data/format/tar.lux index 2567d277f..a3fa4fa3f 100644 --- a/stdlib/source/test/lux/data/format/tar.lux +++ b/stdlib/source/test/lux/data/format/tar.lux @@ -196,10 +196,10 @@ tar (|> (row.row (<tag> [expected_path expected_moment /.none - {#/.user {#/.name /.anonymous - #/.id /.no_id} - #/.group {#/.name /.anonymous - #/.id /.no_id}} + [#/.user [#/.name /.anonymous + #/.id /.no_id] + #/.group [#/.name /.anonymous + #/.id /.no_id]] expected_content])) (format.result /.writer) (<b>.result /.parser))] @@ -254,10 +254,10 @@ tar (|> (row.row (#/.Normal [path (instant.of_millis +0) expected_mode - {#/.user {#/.name /.anonymous - #/.id /.no_id} - #/.group {#/.name /.anonymous - #/.id /.no_id}} + [#/.user [#/.name /.anonymous + #/.id /.no_id] + #/.group [#/.name /.anonymous + #/.id /.no_id]] content])) (format.result /.writer) (<b>.result /.parser))] @@ -277,10 +277,10 @@ tar (|> (row.row (#/.Normal [path (instant.of_millis +0) <expected_mode> - {#/.user {#/.name /.anonymous - #/.id /.no_id} - #/.group {#/.name /.anonymous - #/.id /.no_id}} + [#/.user [#/.name /.anonymous + #/.id /.no_id] + #/.group [#/.name /.anonymous + #/.id /.no_id]] content])) (format.result /.writer) (<b>.result /.parser))] @@ -344,10 +344,10 @@ tar (|> (row.row (#/.Normal [path (instant.of_millis +0) /.none - {#/.user {#/.name expected - #/.id /.no_id} - #/.group {#/.name /.anonymous - #/.id /.no_id}} + [#/.user [#/.name expected + #/.id /.no_id] + #/.group [#/.name /.anonymous + #/.id /.no_id]] content])) (format.result /.writer) (<b>.result /.parser))] @@ -368,10 +368,10 @@ tar (|> (row.row (#/.Normal [path (instant.of_millis +0) /.none - {#/.user {#/.name /.anonymous - #/.id /.no_id} - #/.group {#/.name /.anonymous - #/.id /.no_id}} + [#/.user [#/.name /.anonymous + #/.id /.no_id] + #/.group [#/.name /.anonymous + #/.id /.no_id]] content])) (format.result /.writer) (<b>.result /.parser))] diff --git a/stdlib/source/test/lux/locale/language.lux b/stdlib/source/test/lux/locale/language.lux index e11595968..f8969b224 100644 --- a/stdlib/source/test/lux/locale/language.lux +++ b/stdlib/source/test/lux/locale/language.lux @@ -25,11 +25,11 @@ (type: Bundle (Record - {#amount Nat + [#amount Nat #names (Set Text) #codes (Set Text) #languages (Set /.Language) - #test Test})) + #test Test])) (template [<bundle> <languages>] [(def: <bundle> @@ -37,12 +37,12 @@ (let [amount (template.amount <languages>) languages (: (List /.Language) (`` (list (~~ (template.spliced <languages>)))))] - {#amount amount + [#amount amount #names (|> languages (list\each /.name) (set.of_list text.hash)) #codes (|> languages (list\each /.code) (set.of_list text.hash)) #languages (set.of_list /.hash languages) #test (_.cover <languages> - true)}))] + true)]))] [languages/a [/.afar /.abkhazian /.achinese /.acoli /.adangme /.adyghe /.afro_asiatic /.afrihili /.afrikaans /.ainu diff --git a/stdlib/source/test/lux/locale/territory.lux b/stdlib/source/test/lux/locale/territory.lux index b129c333c..f71e26c78 100644 --- a/stdlib/source/test/lux/locale/territory.lux +++ b/stdlib/source/test/lux/locale/territory.lux @@ -25,27 +25,27 @@ (type: Bundle (Record - {#amount Nat + [#amount Nat #names (Set Text) #shorts (Set Text) #longs (Set Text) #numbers (Set Nat) #territories (Set /.Territory) - #test Test})) + #test Test])) (template [<bundle> <territories>] [(def: <bundle> Bundle (let [amount (template.amount <territories>) territories (`` (list (~~ (template.spliced <territories>))))] - {#amount amount + [#amount amount #names (|> territories (list\each /.name) (set.of_list text.hash)) #shorts (|> territories (list\each /.short_code) (set.of_list text.hash)) #longs (|> territories (list\each /.long_code) (set.of_list text.hash)) #numbers (|> territories (list\each /.numeric_code) (set.of_list n.hash)) #territories (|> territories (set.of_list /.hash)) #test (_.cover <territories> - true)}))] + true)]))] [territories/a [/.afghanistan /.aland_islands /.albania /.algeria /.american_samoa /.andorra /.angola /.anguilla /.antarctica /.antigua diff --git a/stdlib/source/test/lux/macro.lux b/stdlib/source/test/lux/macro.lux index ec8b70644..83c27d94c 100644 --- a/stdlib/source/test/lux/macro.lux +++ b/stdlib/source/test/lux/macro.lux @@ -65,14 +65,14 @@ current_module (name.module (name_of .._))]] (in [seed identifier_prefix - {#.info {#.target "" + [#.info [#.target "" #.version "" - #.mode #.Build} + #.mode #.Build] #.source [location.dummy 0 ""] #.location location.dummy #.current_module (#.Some current_module) #.modules (list [macro_module - {#.module_hash 0 + [#.module_hash 0 #.module_aliases (list) #.definitions (: (List [Text .Global]) (list (!global /.log_single_expansion!) @@ -80,9 +80,9 @@ (!global /.log_full_expansion!))) #.imports (list) #.module_annotations #.None - #.module_state #.Active}] + #.module_state #.Active]] [current_module - {#.module_hash 0 + [#.module_hash 0 #.module_aliases (list) #.definitions (: (List [Text .Global]) (list (!global ..pow/2) @@ -90,17 +90,17 @@ (!global ..repeated))) #.imports (list) #.module_annotations #.None - #.module_state #.Active}]) + #.module_state #.Active]]) #.scopes (list) - #.type_context {#.ex_counter 0 + #.type_context [#.ex_counter 0 #.var_counter 0 - #.var_bindings (list)} + #.var_bindings (list)] #.expected #.None #.seed seed #.scope_type_vars (list) #.extensions [] #.eval (:as (-> Type Code (Meta Any)) []) - #.host []}]))) + #.host []]]))) (def: expander Test diff --git a/stdlib/source/test/lux/macro/syntax/check.lux b/stdlib/source/test/lux/macro/syntax/check.lux index c2bfd9896..7e69b7dec 100644 --- a/stdlib/source/test/lux/macro/syntax/check.lux +++ b/stdlib/source/test/lux/macro/syntax/check.lux @@ -38,8 +38,8 @@ [[type value] ..random] (_.cover [/.format /.parser] (case (<code>.result /.parser - (list (/.format {#/.type type - #/.value value}))) + (list (/.format [#/.type type + #/.value value]))) (#try.Failure _) false diff --git a/stdlib/source/test/lux/macro/syntax/definition.lux b/stdlib/source/test/lux/macro/syntax/definition.lux index e76d65a7b..aaddbdff5 100644 --- a/stdlib/source/test/lux/macro/syntax/definition.lux +++ b/stdlib/source/test/lux/macro/syntax/definition.lux @@ -36,23 +36,23 @@ )) (def: compiler - {#.info {#.target "FAKE" + [#.info [#.target "FAKE" #.version "0.0.0" - #.mode #.Build} + #.mode #.Build] #.source [location.dummy 0 ""] #.location location.dummy #.current_module #.None #.modules (list) #.scopes (list) - #.type_context {#.ex_counter 0 + #.type_context [#.ex_counter 0 #.var_counter 0 - #.var_bindings (list)} + #.var_bindings (list)] #.expected #.None #.seed 0 #.scope_type_vars (list) #.extensions [] #.eval (:as (-> Type Code (Meta Any)) []) - #.host []}) + #.host []]) (def: .public test Test diff --git a/stdlib/source/test/lux/meta.lux b/stdlib/source/test/lux/meta.lux index 9e0175947..132768afa 100644 --- a/stdlib/source/test/lux/meta.lux +++ b/stdlib/source/test/lux/meta.lux @@ -50,23 +50,23 @@ expected_seed random.nat expected random.nat dummy (random.only (|>> (n.= expected) not) random.nat) - .let [expected_lux {#.info {#.target target + .let [expected_lux [#.info [#.target target #.version version - #.mode #.Build} + #.mode #.Build] #.source [location.dummy 0 source_code] #.location location.dummy #.current_module (#.Some expected_current_module) #.modules (list) #.scopes (list) - #.type_context {#.ex_counter 0 + #.type_context [#.ex_counter 0 #.var_counter 0 - #.var_bindings (list)} + #.var_bindings (list)] #.expected (#.Some (#.Primitive primitive_type (list))) #.seed expected_seed #.scope_type_vars (list) #.extensions [] #.eval (:as (-> Type Code (Meta Any)) []) - #.host []}]] + #.host []]]] ($_ _.and (_.cover [/.result] (|> (\ /.monad in expected) @@ -98,23 +98,23 @@ expected random.nat dummy (random.only (|>> (n.= expected) not) random.nat) expected_error (random.ascii/upper 1) - .let [expected_lux {#.info {#.target target + .let [expected_lux [#.info [#.target target #.version version - #.mode #.Build} + #.mode #.Build] #.source [location.dummy 0 source_code] #.location location.dummy #.current_module (#.Some expected_current_module) #.modules (list) #.scopes (list) - #.type_context {#.ex_counter 0 + #.type_context [#.ex_counter 0 #.var_counter 0 - #.var_bindings (list)} + #.var_bindings (list)] #.expected (#.Some (#.Primitive primitive_type (list))) #.seed expected_seed #.scope_type_vars (list) #.extensions [] #.eval (:as (-> Type Code (Meta Any)) []) - #.host []}]] + #.host []]]] ($_ _.and (_.cover [/.failure] (|> (/.failure expected_error) @@ -179,39 +179,39 @@ (not (or (text\= expected_current_module module) (text\= imported_module_name module)))) (random.ascii/upper 1)) - .let [imported_module {#.module_hash 0 + .let [imported_module [#.module_hash 0 #.module_aliases (list) #.definitions (list) #.imports (list) #.module_annotations #.None - #.module_state #.Active} - expected_module {#.module_hash 0 + #.module_state #.Active] + expected_module [#.module_hash 0 #.module_aliases (list) #.definitions (list) #.imports (list imported_module_name) #.module_annotations #.None - #.module_state #.Active} + #.module_state #.Active] expected_modules (list [expected_current_module expected_module] [imported_module_name imported_module]) - expected_lux {#.info {#.target target + expected_lux [#.info [#.target target #.version version - #.mode #.Build} + #.mode #.Build] #.source [location.dummy 0 source_code] #.location location.dummy #.current_module (#.Some expected_current_module) #.modules expected_modules #.scopes (list) - #.type_context {#.ex_counter 0 + #.type_context [#.ex_counter 0 #.var_counter 0 - #.var_bindings (list)} + #.var_bindings (list)] #.expected (#.Some (#.Primitive primitive_type (list))) #.seed expected_seed #.scope_type_vars (list) #.extensions [] #.eval (:as (-> Type Code (Meta Any)) []) - #.host []}]] + #.host []]]] (<| (_.for [.Module]) ($_ _.and (_.cover [/.current_module_name] @@ -293,12 +293,12 @@ expected random.nat dummy (random.only (|>> (n.= expected) not) random.nat) expected_location ..random_location - .let [type_context {#.ex_counter 0 + .let [type_context [#.ex_counter 0 #.var_counter 0 - #.var_bindings (list)} - expected_lux {#.info {#.target target + #.var_bindings (list)] + expected_lux [#.info [#.target target #.version version - #.mode #.Build} + #.mode #.Build] #.source [location.dummy 0 source_code] #.location expected_location #.current_module (#.Some expected_current_module) @@ -310,7 +310,7 @@ #.scope_type_vars (list) #.extensions [] #.eval (:as (-> Type Code (Meta Any)) []) - #.host []}]] + #.host []]]] ($_ _.and (_.cover [/.seed] (|> (do /.monad @@ -369,36 +369,36 @@ (list)))] [current_globals macro_globals - {#.info {#.target "" + [#.info [#.target "" #.version "" - #.mode #.Build} + #.mode #.Build] #.source [location.dummy 0 ""] #.location location.dummy #.current_module (#.Some expected_current_module) #.modules (list [expected_current_module - {#.module_hash 0 + [#.module_hash 0 #.module_aliases (list) #.definitions current_globals #.imports (list) #.module_annotations #.None - #.module_state #.Active}] + #.module_state #.Active]] [expected_macro_module - {#.module_hash 0 + [#.module_hash 0 #.module_aliases (list) #.definitions macro_globals #.imports (list) #.module_annotations #.None - #.module_state #.Active}]) + #.module_state #.Active]]) #.scopes (list) - #.type_context {#.ex_counter 0 + #.type_context [#.ex_counter 0 #.var_counter 0 - #.var_bindings (list)} + #.var_bindings (list)] #.expected #.None #.seed 0 #.scope_type_vars (list) #.extensions [] #.eval (:as (-> Type Code (Meta Any)) []) - #.host []}])))]] + #.host []]])))]] ($_ _.and (_.cover [.Global .Alias /.globals] (let [[current_globals macro_globals expected_lux] @@ -487,36 +487,36 @@ (list)))] [current_globals macro_globals - {#.info {#.target "" + [#.info [#.target "" #.version "" - #.mode #.Build} + #.mode #.Build] #.source [location.dummy 0 ""] #.location location.dummy #.current_module (#.Some expected_current_module) #.modules (list [expected_current_module - {#.module_hash 0 + [#.module_hash 0 #.module_aliases (list) #.definitions current_globals #.imports (list) #.module_annotations #.None - #.module_state #.Active}] + #.module_state #.Active]] [expected_macro_module - {#.module_hash 0 + [#.module_hash 0 #.module_aliases (list) #.definitions macro_globals #.imports (list) #.module_annotations #.None - #.module_state #.Active}]) + #.module_state #.Active]]) #.scopes (list) - #.type_context {#.ex_counter 0 + #.type_context [#.ex_counter 0 #.var_counter 0 - #.var_bindings (list)} + #.var_bindings (list)] #.expected #.None #.seed 0 #.scope_type_vars (list) #.extensions [] #.eval (:as (-> Type Code (Meta Any)) []) - #.host []}])))]] + #.host []]])))]] ($_ _.and (_.cover [/.export] (and (let [[current_globals macro_globals expected_lux] @@ -661,21 +661,21 @@ expected_lux (: Lux - {#.info {#.target "" + [#.info [#.target "" #.version "" - #.mode #.Build} + #.mode #.Build] #.source [location.dummy 0 ""] #.location location.dummy #.current_module (#.Some current_module) #.modules (list [current_module - {#.module_hash 0 + [#.module_hash 0 #.module_aliases (list) #.definitions (list) #.imports (list tag_module) #.module_annotations #.None - #.module_state #.Active}] + #.module_state #.Active]] [tag_module - {#.module_hash 0 + [#.module_hash 0 #.module_aliases (list) #.definitions (list& [name_0 (#.Type [false type_0 (#.Left tags_0)])] [name_1 (#.Type [true type_1 (#.Right tags_1)])] @@ -690,17 +690,17 @@ [(format "#" short) (#.Slot [true type_1 (#.Item tags_1) index])]))))) #.imports (list) #.module_annotations #.None - #.module_state #.Active}]) + #.module_state #.Active]]) #.scopes (list) - #.type_context {#.ex_counter 0 + #.type_context [#.ex_counter 0 #.var_counter 0 - #.var_bindings (list)} + #.var_bindings (list)] #.expected #.None #.seed 0 #.scope_type_vars (list) #.extensions [] #.eval (:as (-> Type Code (Meta Any)) []) - #.host []})]] + #.host []])]] ($_ _.and (_.cover [/.tag_lists] (let [equivalence (list.equivalence @@ -717,12 +717,12 @@ (/.result expected_lux) (try\each (\ (maybe.equivalence (list.equivalence name.equivalence)) = (#.Some (list\each (|>> [tag_module]) (#.Item tags_1))))) (try.else false))) - (_.cover [/.tag] + (_.cover [/.slot] (|> (#.Item tags_1) list.enumeration (list.every? (function (_ [expected_index tag]) (|> [tag_module tag] - /.tag + /.slot (/.result expected_lux) (!expect (^multi (#try.Success [actual_index actual_tags actual_type]) (let [correct_index! @@ -767,50 +767,50 @@ (list [name_4 (#.Definition [false type_4 (' {}) []])])) - scopes (list {#.name (list) + scopes (list [#.name (list) #.inner 0 - #.locals {#.counter 1 - #.mappings (list [name_3 [type_3 3]])} - #.captured {#.counter 0 - #.mappings (list)}} - {#.name (list) + #.locals [#.counter 1 + #.mappings (list [name_3 [type_3 3]])] + #.captured [#.counter 0 + #.mappings (list)]] + [#.name (list) #.inner 0 - #.locals {#.counter 2 + #.locals [#.counter 2 #.mappings (list [name_1 [type_1 1]] - [name_2 [type_2 2]])} - #.captured {#.counter 0 - #.mappings (list)}} - {#.name (list) + [name_2 [type_2 2]])] + #.captured [#.counter 0 + #.mappings (list)]] + [#.name (list) #.inner 0 - #.locals {#.counter 1 - #.mappings (list [name_0 [type_0 0]])} - #.captured {#.counter 0 - #.mappings (list)}})] + #.locals [#.counter 1 + #.mappings (list [name_0 [type_0 0]])] + #.captured [#.counter 0 + #.mappings (list)]])] .let [expected_lux (: Lux - {#.info {#.target "" + [#.info [#.target "" #.version "" - #.mode #.Build} + #.mode #.Build] #.source [location.dummy 0 ""] #.location location.dummy #.current_module (#.Some current_module) #.modules (list [current_module - {#.module_hash 0 + [#.module_hash 0 #.module_aliases (list) #.definitions globals #.imports (list) #.module_annotations #.None - #.module_state #.Active}]) + #.module_state #.Active]]) #.scopes scopes - #.type_context {#.ex_counter 0 + #.type_context [#.ex_counter 0 #.var_counter 0 - #.var_bindings (list)} + #.var_bindings (list)] #.expected #.None #.seed 0 #.scope_type_vars (list) #.extensions [] #.eval (:as (-> Type Code (Meta Any)) []) - #.host []})]] + #.host []])]] ($_ _.and (_.cover [.Scope /.locals] (let [equivalence (: (Equivalence (List (List [Text Type]))) @@ -901,23 +901,23 @@ expected random.nat dummy (random.only (|>> (n.= expected) not) random.nat) expected_location ..random_location - .let [expected_lux {#.info {#.target target + .let [expected_lux [#.info [#.target target #.version version - #.mode #.Build} + #.mode #.Build] #.source [expected_location 0 source_code] #.location expected_location #.current_module (#.Some expected_current_module) #.modules (list) #.scopes (list) - #.type_context {#.ex_counter 0 + #.type_context [#.ex_counter 0 #.var_counter 0 - #.var_bindings (list)} + #.var_bindings (list)] #.expected (#.Some expected_type) #.seed expected_seed #.scope_type_vars (list) #.extensions [] #.eval (:as (-> Type Code (Meta Any)) []) - #.host []}]] + #.host []]]] ($_ _.and (_.for [/.functor] ($functor.spec ..injection (..comparison expected_lux) /.functor)) diff --git a/stdlib/source/test/lux/target/jvm.lux b/stdlib/source/test/lux/target/jvm.lux index 2a9161c8c..436b78d6d 100644 --- a/stdlib/source/test/lux/target/jvm.lux +++ b/stdlib/source/test/lux/target/jvm.lux @@ -135,11 +135,11 @@ (type: (Primitive a) (Record - {#unboxed (Type category.Return) + [#unboxed (Type category.Return) #boxed (Type category.Class) #wrap (Bytecode Any) #random (Random a) - #literal (-> a (Bytecode Any))})) + #literal (-> a (Bytecode Any))])) (def: $Boolean (/type.class "java.lang.Boolean" (list))) @@ -155,11 +155,11 @@ ..!false)) (def: $Boolean::primitive (Primitive java/lang/Boolean) - {#unboxed /type.boolean + [#unboxed /type.boolean #boxed ..$Boolean #wrap ..$Boolean::wrap #random ..$Boolean::random - #literal ..$Boolean::literal}) + #literal ..$Boolean::literal]) (def: $Byte (/type.class "java.lang.Byte" (list))) @@ -173,11 +173,11 @@ (|>> ffi.byte_to_long (:as I64) i32.i32 /.int)) (def: $Byte::primitive (Primitive java/lang/Byte) - {#unboxed /type.byte + [#unboxed /type.byte #boxed ..$Byte #wrap ..$Byte::wrap #random ..$Byte::random - #literal ..$Byte::literal}) + #literal ..$Byte::literal]) (def: $Short (/type.class "java.lang.Short" (list))) @@ -191,11 +191,11 @@ (|>> ffi.short_to_long (:as I64) i32.i32 /.int)) (def: $Short::primitive (Primitive java/lang/Short) - {#unboxed /type.short + [#unboxed /type.short #boxed ..$Short #wrap ..$Short::wrap #random ..$Short::random - #literal ..$Short::literal}) + #literal ..$Short::literal]) (def: $Integer (/type.class "java.lang.Integer" (list))) @@ -209,11 +209,11 @@ (|>> ffi.int_to_long (:as I64) i32.i32 /.int)) (def: $Integer::primitive (Primitive java/lang/Integer) - {#unboxed /type.int + [#unboxed /type.int #boxed ..$Integer #wrap ..$Integer::wrap #random ..$Integer::random - #literal ..$Integer::literal}) + #literal ..$Integer::literal]) (def: $Long (/type.class "java.lang.Long" (list))) (def: $Long::wrap (/.invokestatic ..$Long "valueOf" (/type.method [(list) (list /type.long) ..$Long (list)]))) @@ -221,11 +221,11 @@ (def: $Long::literal (-> java/lang/Long (Bytecode Any)) (|>> (:as Int) /.long)) (def: $Long::primitive (Primitive java/lang/Long) - {#unboxed /type.long + [#unboxed /type.long #boxed ..$Long #wrap ..$Long::wrap #random ..$Long::random - #literal ..$Long::literal}) + #literal ..$Long::literal]) (def: $Float (/type.class "java.lang.Float" (list))) (def: $Float::wrap (/.invokestatic ..$Float "valueOf" (/type.method [(list) (list /type.float) ..$Float (list)]))) @@ -241,11 +241,11 @@ ..$Float::random)) (def: $Float::primitive (Primitive java/lang/Float) - {#unboxed /type.float + [#unboxed /type.float #boxed ..$Float #wrap ..$Float::wrap #random ..valid_float - #literal ..$Float::literal}) + #literal ..$Float::literal]) (def: $Double (/type.class "java.lang.Double" (list))) (def: $Double::wrap (/.invokestatic ..$Double "valueOf" (/type.method [(list) (list /type.double) ..$Double (list)]))) @@ -259,11 +259,11 @@ ..$Double::random)) (def: $Double::primitive (Primitive java/lang/Double) - {#unboxed /type.double + [#unboxed /type.double #boxed ..$Double #wrap ..$Double::wrap #random ..valid_double - #literal ..$Double::literal}) + #literal ..$Double::literal]) (def: $Character (/type.class "java.lang.Character" (list))) @@ -277,11 +277,11 @@ (|>> ffi.char_to_long (:as I64) i32.i32 /.int)) (def: $Character::primitive (Primitive java/lang/Character) - {#unboxed /type.char + [#unboxed /type.char #boxed ..$Character #wrap ..$Character::wrap #random ..$Character::random - #literal ..$Character::literal}) + #literal ..$Character::literal]) (def: $String (/type.class "java.lang.String" (list))) @@ -296,11 +296,11 @@ (def: $String::primitive (Primitive java/lang/String) - {#unboxed ..$String + [#unboxed ..$String #boxed ..$String #wrap /.nop #random ..$String::random - #literal ..$String::literal}) + #literal ..$String::literal]) (template [<name> <bits> <type> <push> <wrap> <message> <to_long> <signed>] [(def: <name> @@ -1374,11 +1374,11 @@ (_.lifted "DRETURN" (primitive_return ..$Double::primitive /.dreturn #.None (!::= java/lang/Double "jvm deq" "jvm double ="))) (_.lifted "ARETURN" (primitive_return ..$String::primitive /.areturn #.None (function (_ expected actual) (text\= (:as Text expected) (:as Text actual))))) (_.lifted "RETURN" (primitive_return (: (Primitive java/lang/String) - {#unboxed /type.void + [#unboxed /type.void #boxed ..$String #wrap /.nop #random ..$String::random - #literal (function.constant /.nop)}) + #literal (function.constant /.nop)]) /.return (#.Some ..$String::literal) (function (_ expected actual) (text\= (:as Text expected) (:as Text actual))))) 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 c39978c4f..e716d380a 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 @@ -175,10 +175,10 @@ (#synthesis.Then (synthesis.i64 (.i64 then)))) (#synthesis.Seq (synthesis.path/bit (not test)) (#synthesis.Then (synthesis.i64 (.i64 else))))) - [{#analysis.when (analysis.pattern/bit test) - #analysis.then (analysis.nat then)} - (list {#analysis.when (analysis.pattern/bit (not test)) - #analysis.then (analysis.nat else)})]]))) + [[#analysis.when (analysis.pattern/bit test) + #analysis.then (analysis.nat then)] + (list [#analysis.when (analysis.pattern/bit (not test)) + #analysis.then (analysis.nat else)])]]))) (def: (random_five hash random_element) (All (_ a) (-> (Hash a) (Random a) (Random [a a a a a]))) @@ -203,11 +203,11 @@ (#synthesis.Seq (<path> test/2) (#synthesis.Then (<synthesis> body/2))) (#synthesis.Seq (<path> test/3) (#synthesis.Then (<synthesis> body/3))) (#synthesis.Seq (<path> test/4) (#synthesis.Then (<synthesis> body/4)))) - [{#analysis.when (<pattern> test/0) #analysis.then (<analysis> body/0)} - (list {#analysis.when (<pattern> test/1) #analysis.then (<analysis> body/1)} - {#analysis.when (<pattern> test/2) #analysis.then (<analysis> body/2)} - {#analysis.when (<pattern> test/3) #analysis.then (<analysis> body/3)} - {#analysis.when (<pattern> test/4) #analysis.then (<analysis> body/4)})]])))] + [[#analysis.when (<pattern> test/0) #analysis.then (<analysis> body/0)] + (list [#analysis.when (<pattern> test/1) #analysis.then (<analysis> body/1)] + [#analysis.when (<pattern> test/2) #analysis.then (<analysis> body/2)] + [#analysis.when (<pattern> test/3) #analysis.then (<analysis> body/3)] + [#analysis.when (<pattern> test/4) #analysis.then (<analysis> body/4)])]])))] [random_nat n.hash random.nat (|>> .i64 synthesis.path/i64) (|>> .i64 synthesis.i64) analysis.pattern/nat analysis.nat] [random_int int.hash random.int (|>> .i64 synthesis.path/i64) (|>> .i64 synthesis.i64) analysis.pattern/int analysis.int] @@ -243,10 +243,10 @@ (#synthesis.Then (synthesis.f64 body))))) branch (: (-> Nat Bit Text Frac Branch) (function (_ lefts right? value body) - {#analysis.when (analysis.pattern/variant {#analysis.lefts lefts + [#analysis.when (analysis.pattern/variant [#analysis.lefts lefts #analysis.right? right? - #analysis.value (analysis.pattern/text value)}) - #analysis.then (analysis.frac body)}))]] + #analysis.value (analysis.pattern/text value)]) + #analysis.then (analysis.frac body)]))]] (in [($_ #synthesis.Alt (path lefts/0 false value/0 body/0) (path lefts/1 false value/1 body/1) @@ -289,14 +289,14 @@ (#synthesis.Then (synthesis.f64 body)))))) branch (: (-> Nat Bit Text Frac Branch) (function (_ lefts right? value body) - {#analysis.when (if right? + [#analysis.when (if right? (analysis.pattern/tuple (list\composite (list.repeated (++ lefts) (analysis.pattern/unit)) (list (analysis.pattern/text value)))) (analysis.pattern/tuple ($_ list\composite (list.repeated lefts (analysis.pattern/unit)) (list (analysis.pattern/text value) (analysis.pattern/unit))))) - #analysis.then (analysis.frac body)}))]] + #analysis.then (analysis.frac body)]))]] (in [(list\mix (function (_ left right) (#synthesis.Alt left right)) (path (++ mid_size) true value/last body/last) 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 f66e00492..099e10d50 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 @@ -39,14 +39,14 @@ (def: (n_function loop? arity body) (-> Bit Arity Synthesis Synthesis) (synthesis.function/abstraction - {#synthesis.environment (list) + [#synthesis.environment (list) #synthesis.arity arity #synthesis.body (if loop? (synthesis.loop/scope - {#synthesis.start 1 + [#synthesis.start 1 #synthesis.inits (list) - #synthesis.iteration body}) - body)})) + #synthesis.iteration body]) + body)])) (def: (n_abstraction arity body) (-> Arity Analysis Analysis) @@ -70,9 +70,10 @@ false)) (type: Circumstance - {#loop? Bit - #expectation Synthesis - #reality Analysis}) + (Record + [#loop? Bit + #expectation Synthesis + #reality Analysis])) (type: Scenario (-> Bit (Random Circumstance))) @@ -119,13 +120,13 @@ [loop? expected_value actual_value] (random_value false)] (in [loop? (synthesis.variant - {#analysis.lefts lefts + [#analysis.lefts lefts #analysis.right? right? - #analysis.value expected_value}) + #analysis.value expected_value]) (analysis.variant - {#analysis.lefts lefts + [#analysis.lefts lefts #analysis.right? right? - #analysis.value actual_value})]))) + #analysis.value actual_value])]))) (def: (random_tuple random_value output?) (-> Scenario Scenario) @@ -211,29 +212,29 @@ synthesis.path/pop (synthesis.path/then expected_output))))]) (#analysis.Case actual_input - [{#analysis.when (analysis.pattern/unit) - #analysis.then actual_output} - (list {#analysis.when (analysis.pattern/bit bit_test) - #analysis.then actual_output} - {#analysis.when (analysis.pattern/nat (.nat i64_test)) - #analysis.then actual_output} - {#analysis.when (analysis.pattern/frac f64_test) - #analysis.then actual_output} - {#analysis.when (analysis.pattern/text text_test) - #analysis.then actual_output} - {#analysis.when (#analysis.Bind 2) - #analysis.then actual_output} - {#analysis.when (analysis.pattern/variant - {#analysis.lefts lefts + [[#analysis.when (analysis.pattern/unit) + #analysis.then actual_output] + (list [#analysis.when (analysis.pattern/bit bit_test) + #analysis.then actual_output] + [#analysis.when (analysis.pattern/nat (.nat i64_test)) + #analysis.then actual_output] + [#analysis.when (analysis.pattern/frac f64_test) + #analysis.then actual_output] + [#analysis.when (analysis.pattern/text text_test) + #analysis.then actual_output] + [#analysis.when (#analysis.Bind 2) + #analysis.then actual_output] + [#analysis.when (analysis.pattern/variant + [#analysis.lefts lefts #analysis.right? right? - #analysis.value (#analysis.Bind 2)}) - #analysis.then actual_output} - {#analysis.when (analysis.pattern/tuple + #analysis.value (#analysis.Bind 2)]) + #analysis.then actual_output] + [#analysis.when (analysis.pattern/tuple (list\composite (list.repeated lefts (analysis.pattern/unit)) (if right? (list (analysis.pattern/unit) (#analysis.Bind 2)) (list (#analysis.Bind 2) (analysis.pattern/unit))))) - #analysis.then actual_output})])]))) + #analysis.then actual_output])])]))) (def: (random_let arity random_value output?) (-> Arity Scenario Scenario) @@ -246,8 +247,8 @@ (++ arity) expected_output]) (#analysis.Case actual_input - [{#analysis.when (#analysis.Bind 2) - #analysis.then actual_output} + [[#analysis.when (#analysis.Bind 2) + #analysis.then actual_output] (list)])]))) (def: (random_if random_value output?) @@ -265,15 +266,15 @@ expected_else]) (if flip? (#analysis.Case actual_test - [{#analysis.when (analysis.pattern/bit false) - #analysis.then actual_else} - (list {#analysis.when (analysis.pattern/bit true) - #analysis.then actual_then})]) + [[#analysis.when (analysis.pattern/bit false) + #analysis.then actual_else] + (list [#analysis.when (analysis.pattern/bit true) + #analysis.then actual_then])]) (#analysis.Case actual_test - [{#analysis.when (analysis.pattern/bit true) - #analysis.then actual_then} - (list {#analysis.when (analysis.pattern/bit false) - #analysis.then actual_else})]))]))) + [[#analysis.when (analysis.pattern/bit true) + #analysis.then actual_then] + (list [#analysis.when (analysis.pattern/bit false) + #analysis.then actual_else])]))]))) (def: (random_get random_value output?) (-> Scenario Scenario) @@ -287,12 +288,12 @@ (#.Left lefts))) expected_record]) (#analysis.Case actual_record - [{#analysis.when (analysis.pattern/tuple + [[#analysis.when (analysis.pattern/tuple (list\composite (list.repeated lefts (analysis.pattern/unit)) (if right? (list (analysis.pattern/unit) (#analysis.Bind 2)) (list (#analysis.Bind 2) (analysis.pattern/unit))))) - #analysis.then (#analysis.Reference (reference.local 2))} + #analysis.then (#analysis.Reference (reference.local 2))] (list)])]))) (def: (random_branch arity random_value output?) @@ -323,9 +324,9 @@ true (list\each product.left resets)) (synthesis.loop/scope - {#synthesis.start (++ arity) + [#synthesis.start (++ arity) #synthesis.inits (list\each (|>> product.right product.left) resets) - #synthesis.iteration expected_output}) + #synthesis.iteration expected_output]) (analysis.apply [(..n_abstraction arity actual_output) (list\each (|>> product.right product.right) resets)])]))) @@ -349,12 +350,12 @@ (list (#variable.Local 1)))]] (in [true (synthesis.function/abstraction - {#synthesis.environment environment + [#synthesis.environment environment #synthesis.arity 1 #synthesis.body (synthesis.loop/scope - {#synthesis.start 1 + [#synthesis.start 1 #synthesis.inits (list) - #synthesis.iteration expected_output})}) + #synthesis.iteration expected_output])]) (#analysis.Function environment actual_output)]))) diff --git a/stdlib/source/test/lux/tool/compiler/language/lux/phase/synthesis/loop.lux b/stdlib/source/test/lux/tool/compiler/language/lux/phase/synthesis/loop.lux index 63212fe0a..59e9f03cf 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 @@ -92,13 +92,13 @@ [next [valueE valueA]] (..reference offset arity next)] (in [next [(//.variant - {#analysis.lefts lefts + [#analysis.lefts lefts #analysis.right? right? - #analysis.value valueE}) + #analysis.value valueE]) (//.variant - {#analysis.lefts lefts + [#analysis.lefts lefts #analysis.right? right? - #analysis.value valueA})]])) + #analysis.value valueA])]])) (do {! random.monad} [[next [leftE leftA]] (..reference offset arity next) [next [rightE rightA]] (..reference offset arity next)] @@ -204,13 +204,13 @@ [next [iterationE iterationA]] (..reference offset arity next)] (in [next [(//.loop/scope - {#//.start (/.register_optimization offset next) + [#//.start (/.register_optimization offset next) #//.inits (list firstE secondE) - #//.iteration iterationE}) + #//.iteration iterationE]) (//.loop/scope - {#//.start next + [#//.start next #//.inits (list firstA secondA) - #//.iteration iterationA})]])) + #//.iteration iterationA])]])) )) (def: (function offset arity next) @@ -223,13 +223,13 @@ [next [bodyE bodyA]] (..primitive 0 arity next)] (in [next [(//.function/abstraction - {#//.environment (list firstE secondE) + [#//.environment (list firstE secondE) #//.arity arity - #//.body bodyE}) + #//.body bodyE]) (//.function/abstraction - {#//.environment (list firstA secondA) + [#//.environment (list firstA secondA) #//.arity arity - #//.body bodyA})]])) + #//.body bodyA])]])) )) (def: (control offset arity next) @@ -274,11 +274,11 @@ [_ [expected iteration]] (..scenario expected_offset arity 0)] (_.cover [/.Transform /.optimization /.register_optimization] (case (/.optimization true expected_offset expected_inits - {#//.environment (|> expected_offset + [#//.environment (|> expected_offset list.indices (list\each (|>> #variable.Local))) #//.arity arity - #//.body iteration}) + #//.body iteration]) (^ (#.Some (//.loop/scope [actual_offset actual_inits actual]))) (and (n.= expected_offset 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 e817d05c5..fa9a9f646 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 @@ -35,8 +35,8 @@ false)) (type: Context - {#redundants Nat - #necessary (Dictionary Nat Nat)}) + [#redundants Nat + #necessary (Dictionary Nat Nat)]) (type: (Scenario a) (-> Context (Random [a a]))) @@ -319,8 +319,8 @@ (def: default Context - {#redundants 0 - #necessary (dictionary.empty n.hash)}) + [#redundants 0 + #necessary (dictionary.empty n.hash)]) (def: .public test Test diff --git a/stdlib/source/test/lux/type/poly/equivalence.lux b/stdlib/source/test/lux/type/poly/equivalence.lux index a66c390b3..e30ae9ba4 100644 --- a/stdlib/source/test/lux/type/poly/equivalence.lux +++ b/stdlib/source/test/lux/type/poly/equivalence.lux @@ -38,7 +38,7 @@ (type: Record (.Record - {#bit Bit + [#bit Bit #int Int #frac Frac #text Text @@ -46,7 +46,7 @@ #list (List Int) #variant Variant #tuple [Int Frac Text] - #recursive Recursive})) + #recursive Recursive])) (def: gen_recursive (Random Recursive) diff --git a/stdlib/source/test/lux/type/poly/json.lux b/stdlib/source/test/lux/type/poly/json.lux index 9b6d5338a..f5bc61ab0 100644 --- a/stdlib/source/test/lux/type/poly/json.lux +++ b/stdlib/source/test/lux/type/poly/json.lux @@ -62,7 +62,7 @@ (type: Record (.Record - {#bit Bit + [#bit Bit #frac Frac #text Text #maybe (Maybe Frac) @@ -74,7 +74,7 @@ ... #instant ti.Instant ... #duration tdu.Duration #date tda.Date - #grams (unit.Qty unit.Gram)})) + #grams (unit.Qty unit.Gram)])) (def: gen_recursive (Random Recursive) diff --git a/stdlib/source/test/lux/world/net/http/client.lux b/stdlib/source/test/lux/world/net/http/client.lux index cdac7ac43..3f0531040 100644 --- a/stdlib/source/test/lux/world/net/http/client.lux +++ b/stdlib/source/test/lux/world/net/http/client.lux @@ -60,10 +60,10 @@ (\ nat.decimal encoded) (\ utf8.codec encoded))] (#try.Success [//status.ok - {#//.headers headers + [#//.headers headers #//.body (function (_ ?wanted_bytes) (io.io (#try.Success [(binary.size data) - data])))}]))))))]] + data])))]]))))))]] (`` ($_ _.and (~~ (template [<definition> <expected>] [(_.cover [<definition>] |