diff options
author | Eduardo Julian | 2021-09-03 21:51:30 -0400 |
---|---|---|
committer | Eduardo Julian | 2021-09-03 21:51:30 -0400 |
commit | 891b1cfc82322f8017f0a4f6b707d6fe52024545 (patch) | |
tree | 957429c0a2ad850b3570492deabe054fb2ace63e /stdlib/source/test | |
parent | e76add6e6f904677f5c09bb2a66dce283f1b848a (diff) |
Unified tuple and record syntax.
Diffstat (limited to '')
27 files changed, 305 insertions, 304 deletions
diff --git a/stdlib/source/test/aedifex/artifact/snapshot/version/value.lux b/stdlib/source/test/aedifex/artifact/snapshot/version/value.lux index 915d283da..370ea21ab 100644 --- a/stdlib/source/test/aedifex/artifact/snapshot/version/value.lux +++ b/stdlib/source/test/aedifex/artifact/snapshot/version/value.lux @@ -53,8 +53,8 @@ (text\= version (/.format (with@ #/.snapshot #///.Local sample))) - remote_format (/.format {#/.version (format version /.snapshot) - #/.snapshot (#///.Remote stamp)}) + remote_format (/.format [#/.version (format version /.snapshot) + #/.snapshot (#///.Remote stamp)]) remote! (and (text.starts_with? (format version (///time.format (value@ #///stamp.time stamp))) remote_format) diff --git a/stdlib/source/test/aedifex/cache.lux b/stdlib/source/test/aedifex/cache.lux index 143766eb6..0390e441d 100644 --- a/stdlib/source/test/aedifex/cache.lux +++ b/stdlib/source/test/aedifex/cache.lux @@ -73,8 +73,8 @@ [[identity profile pom] ..profile type ..type content ..content] - (in [{#//dependency.artifact identity - #//dependency.type type} + (in [[#//dependency.artifact identity + #//dependency.type type] (with@ #//package.origin (#//repository/origin.Remote "") (//package.local pom content))]))) (def: resolution diff --git a/stdlib/source/test/aedifex/command/build.lux b/stdlib/source/test/aedifex/command/build.lux index ff5f7450b..95363b079 100644 --- a/stdlib/source/test/aedifex/command/build.lux +++ b/stdlib/source/test/aedifex/command/build.lux @@ -109,17 +109,17 @@ (Random Dependency) (do random.monad [lux_version (random.ascii/alpha 5) - .let [js_compiler {#///dependency.artifact {#///artifact.group /.lux_group + .let [js_compiler [#///dependency.artifact [#///artifact.group /.lux_group #///artifact.name /.js_compiler_name - #///artifact.version lux_version} - #///dependency.type ///artifact/type.js_library}]] + #///artifact.version lux_version] + #///dependency.type ///artifact/type.js_library]]] (`` ($_ random.either (in js_compiler) (~~ (template [<compiler>] - [(in {#///dependency.artifact {#///artifact.group /.lux_group + [(in [#///dependency.artifact [#///artifact.group /.lux_group #///artifact.name <compiler> - #///artifact.version lux_version} - #///dependency.type ///artifact/type.lux_library})] + #///artifact.version lux_version] + #///dependency.type ///artifact/type.lux_library])] [/.jvm_compiler_name] [/.python_compiler_name] diff --git a/stdlib/source/test/aedifex/command/deps.lux b/stdlib/source/test/aedifex/command/deps.lux index 87a3e1731..95f757f7d 100644 --- a/stdlib/source/test/aedifex/command/deps.lux +++ b/stdlib/source/test/aedifex/command/deps.lux @@ -67,10 +67,10 @@ [_ dependee_package] $///package.random [_ depender_package] $///package.random - .let [dependee {#///dependency.artifact dependee_artifact - #///dependency.type ///artifact/type.lux_library} - depender {#///dependency.artifact depender_artifact - #///dependency.type ///artifact/type.lux_library} + .let [dependee [#///dependency.artifact dependee_artifact + #///dependency.type ///artifact/type.lux_library] + depender [#///dependency.artifact depender_artifact + #///dependency.type ///artifact/type.lux_library] dependee_pom (|> (\ ///.monoid identity) (with@ #///.identity (#.Some dependee_artifact)) diff --git a/stdlib/source/test/aedifex/dependency/deployment.lux b/stdlib/source/test/aedifex/dependency/deployment.lux index cd92cec74..f87aca761 100644 --- a/stdlib/source/test/aedifex/dependency/deployment.lux +++ b/stdlib/source/test/aedifex/dependency/deployment.lux @@ -52,11 +52,11 @@ (def: good_upload (@http.Response IO) [http/status.created - {#@http.headers (http.headers (list)) + [#@http.headers (http.headers (list)) #@http.body (function (_ _) (|> [0 (binary.empty 0)] #try.Success - io.io))}]) + io.io))]]) (type: Cache (Atom (Dictionary URL Binary))) diff --git a/stdlib/source/test/aedifex/dependency/resolution.lux b/stdlib/source/test/aedifex/dependency/resolution.lux index 355cf9c98..9f1826f9c 100644 --- a/stdlib/source/test/aedifex/dependency/resolution.lux +++ b/stdlib/source/test/aedifex/dependency/resolution.lux @@ -53,8 +53,8 @@ (do {! random.monad} [artifact $///artifact.random [_ package] $///package.random] - (in (dictionary.has {#///dependency.artifact artifact - #///dependency.type ///artifact/type.lux_library} + (in (dictionary.has [#///dependency.artifact artifact + #///dependency.type ///artifact/type.lux_library] package /.empty)))) @@ -260,8 +260,8 @@ (`` ($_ _.and (in (do async.monad [actual_package (/.one (///repository.mock good []) - {#///dependency.artifact expected_artifact - #///dependency.type ///artifact/type.lux_library})] + [#///dependency.artifact expected_artifact + #///dependency.type ///artifact/type.lux_library])] (_.cover' [/.one] (case actual_package (#try.Success actual_package) @@ -274,8 +274,8 @@ (~~ (template [<exception> <bad>] [(in (do async.monad [actual_package (/.one (///repository.mock <bad> []) - {#///dependency.artifact expected_artifact - #///dependency.type ///artifact/type.lux_library})] + [#///dependency.artifact expected_artifact + #///dependency.type ///artifact/type.lux_library])] (_.cover' [<exception>] (case actual_package (#try.Failure error) @@ -309,8 +309,8 @@ (list (///repository.mock bad_sha-1 []) (///repository.mock bad_md5 []) (///repository.mock good [])) - {#///dependency.artifact expected_artifact - #///dependency.type ///artifact/type.lux_library})] + [#///dependency.artifact expected_artifact + #///dependency.type ///artifact/type.lux_library])] (_.cover' [/.any] (case actual_package (#try.Success actual_package) @@ -325,8 +325,8 @@ actual_package (/.any console (list (///repository.mock bad_sha-1 []) (///repository.mock bad_md5 [])) - {#///dependency.artifact expected_artifact - #///dependency.type ///artifact/type.lux_library})] + [#///dependency.artifact expected_artifact + #///dependency.type ///artifact/type.lux_library])] (_.cover' [/.cannot_resolve] (case actual_package (#try.Failure error) @@ -358,12 +358,12 @@ [_ depender_package] $///package.random [_ ignored_package] $///package.random - .let [dependee {#///dependency.artifact dependee_artifact - #///dependency.type ///artifact/type.lux_library} - depender {#///dependency.artifact depender_artifact - #///dependency.type ///artifact/type.lux_library} - ignored {#///dependency.artifact ignored_artifact - #///dependency.type ///artifact/type.lux_library} + .let [dependee [#///dependency.artifact dependee_artifact + #///dependency.type ///artifact/type.lux_library] + depender [#///dependency.artifact depender_artifact + #///dependency.type ///artifact/type.lux_library] + ignored [#///dependency.artifact ignored_artifact + #///dependency.type ///artifact/type.lux_library] dependee_pom (|> (\ ///.monoid identity) (with@ #///.identity (#.Some dependee_artifact)) diff --git a/stdlib/source/test/aedifex/metadata/artifact.lux b/stdlib/source/test/aedifex/metadata/artifact.lux index eb8b4aec1..e5e903e65 100644 --- a/stdlib/source/test/aedifex/metadata/artifact.lux +++ b/stdlib/source/test/aedifex/metadata/artifact.lux @@ -60,10 +60,10 @@ month (month.by_number month) date (date.date year month day_of_month) time (time.time - {#time.hour hour + [#time.hour hour #time.minute minute #time.second second - #time.milli_second 0})] + #time.milli_second 0])] (in (instant.of_date_time date time)))))))) (def: .public test @@ -72,12 +72,12 @@ (_.for [/.Metadata]) (do random.monad [expected ..random - .let [artifact {#///artifact.group (value@ #/.group expected) + .let [artifact [#///artifact.group (value@ #/.group expected) #///artifact.name (value@ #/.name expected) #///artifact.version (|> expected (value@ #/.versions) list.head - (maybe.else ""))}]] + (maybe.else ""))]]] ($_ _.and (_.for [/.equivalence] ($equivalence.spec /.equivalence ..random)) diff --git a/stdlib/source/test/aedifex/metadata/snapshot.lux b/stdlib/source/test/aedifex/metadata/snapshot.lux index 5010053a5..5308c10ca 100644 --- a/stdlib/source/test/aedifex/metadata/snapshot.lux +++ b/stdlib/source/test/aedifex/metadata/snapshot.lux @@ -64,10 +64,10 @@ month (month.by_number month) date (date.date year month day_of_month) time (time.time - {#time.hour hour + [#time.hour hour #time.minute minute #time.second second - #time.milli_second 0})] + #time.milli_second 0])] (in (instant.of_date_time date time))))))) (def: random_versioning diff --git a/stdlib/source/test/aedifex/repository/remote.lux b/stdlib/source/test/aedifex/repository/remote.lux index 3013d8889..3218f15cd 100644 --- a/stdlib/source/test/aedifex/repository/remote.lux +++ b/stdlib/source/test/aedifex/repository/remote.lux @@ -42,8 +42,8 @@ (implementation (def: (request method url headers input) (with_expansions [<failure> [http/status.bad_request - {#@http.headers (http.headers (list)) - #@http.body (..url_body "")}]] + [#@http.headers (http.headers (list)) + #@http.body (..url_body "")]]] (<| io.io #try.Success (if (|> headers @@ -53,8 +53,8 @@ (case [method input] [#@http.Get #.None] [http/status.ok - {#@http.headers (http.headers (list)) - #@http.body (..url_body url)}] + [#@http.headers (http.headers (list)) + #@http.body (..url_body url)]] [#@http.Put (#.Some input)] (if (|> headers @@ -62,8 +62,8 @@ (maybe\each (text\= (//identity.basic_auth user password))) (maybe.else false)) [http/status.created - {#@http.headers (http.headers (list)) - #@http.body (..url_body url)}] + [#@http.headers (http.headers (list)) + #@http.body (..url_body url)]] <failure>) _ @@ -77,8 +77,8 @@ (<| io.io #try.Success [http/status.bad_request - {#@http.headers (http.headers (list)) - #@http.body (..url_body "")}])))) + [#@http.headers (http.headers (list)) + #@http.body (..url_body "")]])))) (def: .public test Test @@ -95,8 +95,8 @@ ($_ _.and (_.cover [/.repository /.user_agent /.Address] (let [repo (/.repository (..good_http user password) - (#.Some {#//identity.user user - #//identity.password password}) + (#.Some [#//identity.user user + #//identity.password password]) address)] (and (|> (\ repo download uri) io.run! diff --git a/stdlib/source/test/lux.lux b/stdlib/source/test/lux.lux index b7fb2feb5..bdc83f437 100644 --- a/stdlib/source/test/lux.lux +++ b/stdlib/source/test/lux.lux @@ -470,8 +470,8 @@ (/.type: for_type/record (Record - {#slot/0 Bit - #slot/1 Rev})) + [#slot/0 Bit + #slot/1 Rev])) (/.type: (for_type/all parameter) [parameter parameter]) @@ -564,8 +564,8 @@ (_.cover [/.Record] (exec (: for_type/record - {#slot/0 (n.= expected_left expected_right) - #slot/1 (.rev expected_right)}) + [#slot/0 (n.= expected_left expected_right) + #slot/1 (.rev expected_right)]) true)) )))) @@ -666,13 +666,13 @@ (type: Small (Record - {#small_left Nat - #small_right Text})) + [#small_left Nat + #small_right Text])) (type: Big (Record - {#big_left Nat - #big_right Small})) + [#big_left Nat + #big_right Small])) (def: for_slot Test @@ -685,9 +685,9 @@ .let [expected/s (n.+ shift/s start/s) expected/b (n.+ shift/b start/b) - sample {#big_left start/b - #big_right {#small_left start/s - #small_right text}}]] + sample [#big_left start/b + #big_right [#small_left start/s + #small_right text]]]] ($_ _.and (_.cover [/.value@] (and (and (|> sample @@ -903,12 +903,12 @@ (type: (Pair l r) (Record - {#left l - #right r})) + [#left l + #right r])) (template: (!pair <left> <right>) - [{#left <left> - #right <right>}]) + [[#left <left> + #right <right>]]) (def: for_case Test @@ -944,8 +944,8 @@ (/.case [expected_nat expected_int] [0 +0] true _ false) - (/.case {#left expected_nat #right expected_int} - {#left 0 #right +0} true + (/.case [#left expected_nat #right expected_int] + [#left 0 #right +0] true _ false) (/.case (: (Either Nat Int) (#.Left expected_nat)) (#.Left 0) true @@ -965,17 +965,17 @@ (/.^or "+0.5" "+1.25") true _ false))) (_.cover [/.^slots] - (/.case {#left expected_nat #right expected_int} + (/.case [#left expected_nat #right expected_int] (/.^slots [#left #right]) (and (/.same? expected_nat left) (/.same? expected_int right)))) (_.cover [/.^] - (/.case {#left expected_nat #right expected_int} + (/.case [#left expected_nat #right expected_int] (/.^ (!pair 0 +0)) true _ false)) (_.cover [/.^@] (let [expected_pair (: (Pair Nat Int) - {#left expected_nat #right expected_int})] + [#left expected_nat #right expected_int])] (/.case expected_pair (/.^@ actual_pair (/.^ (!pair actual_left actual_right))) (and (/.same? expected_pair actual_pair) @@ -983,7 +983,7 @@ (/.same? expected_int actual_right))))) (_.cover [/.^multi] (let [expected_pair (: (Pair Nat Int) - {#left expected_nat #right expected_int})] + [#left expected_nat #right expected_int])] (and (/.case expected_pair (/.^multi (/.^ (!pair 0 actual_right)) {actual_right +0}) @@ -1011,7 +1011,7 @@ (_.cover [/.let] (and (/.let [actual_nat expected_nat] (/.same? expected_nat actual_nat)) - (/.let [[actual_left actual_right] {#left expected_nat #right expected_int}] + (/.let [[actual_left actual_right] [#left expected_nat #right expected_int]] (and (/.same? expected_nat actual_left) (/.same? expected_int actual_right))))) ))) 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>] |