From 17629d66062b88b040a2397032f6c08361a5f3a7 Mon Sep 17 00:00:00 2001 From: Eduardo Julian Date: Thu, 12 Aug 2021 03:12:42 -0400 Subject: Improved binding syntax for "syntax:". --- stdlib/source/program/aedifex/command/auto.lux | 4 ++-- stdlib/source/program/aedifex/command/build.lux | 8 ++++---- stdlib/source/program/aedifex/command/deps.lux | 2 +- stdlib/source/program/aedifex/dependency/resolution.lux | 2 +- stdlib/source/program/aedifex/format.lux | 12 ++++++------ stdlib/source/program/aedifex/parser.lux | 2 +- stdlib/source/program/aedifex/pom.lux | 4 ++-- stdlib/source/program/aedifex/project.lux | 2 +- stdlib/source/program/compositor.lux | 2 +- 9 files changed, 19 insertions(+), 19 deletions(-) (limited to 'stdlib/source/program') diff --git a/stdlib/source/program/aedifex/command/auto.lux b/stdlib/source/program/aedifex/command/auto.lux index 579f68462..805ffb1ba 100644 --- a/stdlib/source/program/aedifex/command/auto.lux +++ b/stdlib/source/program/aedifex/command/auto.lux @@ -33,7 +33,7 @@ (\ ! map (|>> (try.else (list)) (monad.map ! (targets fs)))) (\ ! join) - (\ ! map (|>> list.concat (list& path)))))) + (\ ! map (|>> list.joined (list& path)))))) (def: .public delay Nat @@ -56,7 +56,7 @@ (get@ #///.sources) set.list (monad.map ! (..targets fs)) - (\ ! map list.concat))] + (\ ! map list.joined))] (do {! ///action.monad} [_ (monad.map ! (\ watcher start watch.modification) targets) _ ] diff --git a/stdlib/source/program/aedifex/command/build.lux b/stdlib/source/program/aedifex/command/build.lux index 58df179e2..e14eee20f 100644 --- a/stdlib/source/program/aedifex/command/build.lux +++ b/stdlib/source/program/aedifex/command/build.lux @@ -167,11 +167,11 @@ (case (dictionary.get identity uniques) (#.Some [current_version current_path]) (if (\ version_order < version current_version) - (dictionary.put identity [version dependency] uniques) + (dictionary.has identity [version dependency] uniques) uniques) #.None - (dictionary.put identity [version dependency] uniques)))) + (dictionary.has identity [version dependency] uniques)))) (: (Dictionary [Group Name] [Version Dependency]) (dictionary.empty (product.hash text.hash text.hash)))) dictionary.values @@ -183,7 +183,7 @@ (def: (plural name) (-> Text (List Text) (List Text)) - (|>> (list\map (|>> (list name))) list.concat)) + (|>> (list\map (|>> (list name))) list.joined)) (def: .public start "[BUILD STARTED]") (def: .public success "[BUILD ENDED]") @@ -294,7 +294,7 @@ / (\ fs separator) cache_directory (format working_directory / target)] _ (console.write_line ..start console) - .let [full_parameters (list.concat (list compiler_params + .let [full_parameters (list.joined (list compiler_params (list "build") (..plural "--library" (..libraries fs home resolution)) (..plural "--host_dependency" host_dependencies) diff --git a/stdlib/source/program/aedifex/command/deps.lux b/stdlib/source/program/aedifex/command/deps.lux index 185bd6229..3cbb82403 100644 --- a/stdlib/source/program/aedifex/command/deps.lux +++ b/stdlib/source/program/aedifex/command/deps.lux @@ -55,7 +55,7 @@ cache)] (do ///action.monad [cached (|> (dictionary.keys cache) - (list\fold dictionary.remove resolution) + (list\fold dictionary.lacks resolution) (///dependency/deployment.all local)) _ (console.write_line (exception.report ["Local successes" (|> local_successes diff --git a/stdlib/source/program/aedifex/dependency/resolution.lux b/stdlib/source/program/aedifex/dependency/resolution.lux index d86bef56b..05ae5c523 100644 --- a/stdlib/source/program/aedifex/dependency/resolution.lux +++ b/stdlib/source/program/aedifex/dependency/resolution.lux @@ -246,7 +246,7 @@ (#.Item head successes) failures sub_dependencies - (dictionary.put head package resolution))] + (dictionary.has head package resolution))] (recur repositories successes failures diff --git a/stdlib/source/program/aedifex/format.lux b/stdlib/source/program/aedifex/format.lux index c0c9db2d1..82b15f84d 100644 --- a/stdlib/source/program/aedifex/format.lux +++ b/stdlib/source/program/aedifex/format.lux @@ -75,7 +75,7 @@ aggregate (#.Some value) - (dictionary.put field (format value) aggregate))) + (dictionary.has field (format value) aggregate))) (def: (on_list field value format aggregate) (All [a] @@ -85,7 +85,7 @@ aggregate value - (dictionary.put field (` [(~+ (list\map format value))]) aggregate))) + (dictionary.has field (` [(~+ (list\map format value))]) aggregate))) (def: (on_set field value format aggregate) (All [a] @@ -97,7 +97,7 @@ (-> Text (Dictionary k v) (Format k) (Format v) Aggregate Aggregate)) (if (dictionary.empty? value) aggregate - (dictionary.put field + (dictionary.has field (|> value dictionary.entries (list\map (function (_ [key value]) @@ -147,14 +147,14 @@ (..on_maybe "info" (get@ #/.info value) ..info) (..on_set "repositories" (get@ #/.repositories value) code.text) (..on_set "dependencies" (get@ #/.dependencies value) ..dependency) - (dictionary.put "compiler" (..dependency (get@ #/.compiler value))) + (dictionary.has "compiler" (..dependency (get@ #/.compiler value))) (..on_set "sources" (get@ #/.sources value) code.text) - (dictionary.put "target" (code.text (get@ #/.target value))) + (dictionary.has "target" (code.text (get@ #/.target value))) (..on_maybe "program" (get@ #/.program value) code.text) (..on_maybe "test" (get@ #/.test value) code.text) (..on_dictionary "deploy_repositories" (get@ #/.deploy_repositories value) code.text code.text) (~~ (template [] - [(dictionary.put (template.text []) (..runtime (get@ value)))] + [(dictionary.has (template.text []) (..runtime (get@ value)))] [#/.java] [#/.js] diff --git a/stdlib/source/program/aedifex/parser.lux b/stdlib/source/program/aedifex/parser.lux index 9eaba0b92..37ce2c46b 100644 --- a/stdlib/source/program/aedifex/parser.lux +++ b/stdlib/source/program/aedifex/parser.lux @@ -198,7 +198,7 @@ (|> (..plural input "repositories" ..repository) (\ ! map (set.of_list text.hash)) (<>.else (set.empty text.hash)) - (\ ! map (set.add /.default_repository)))) + (\ ! map (set.has /.default_repository)))) ^dependencies (: (Parser (Set //dependency.Dependency)) (|> (..plural input "dependencies" ..dependency) (\ ! map (set.of_list //dependency.hash)) diff --git a/stdlib/source/program/aedifex/pom.lux b/stdlib/source/program/aedifex/pom.lux index d18bd9209..146ef471b 100644 --- a/stdlib/source/program/aedifex/pom.lux +++ b/stdlib/source/program/aedifex/pom.lux @@ -226,6 +226,6 @@ _ (<>.some .any)] (in (|> (\ /.monoid identity) (update@ #/.dependencies (function (_ empty) - (list\fold set.add empty dependencies))) + (list\fold set.has empty dependencies))) (update@ #/.repositories (function (_ empty) - (list\fold set.add empty repositories))))))))) + (list\fold set.has empty repositories))))))))) diff --git a/stdlib/source/program/aedifex/project.lux b/stdlib/source/program/aedifex/project.lux index 30c4d9538..fdaf77e6c 100644 --- a/stdlib/source/program/aedifex/project.lux +++ b/stdlib/source/program/aedifex/project.lux @@ -61,7 +61,7 @@ #.None (do {! try.monad} - [parents (monad.map ! (profile' (set.add name lineage) project) + [parents (monad.map ! (profile' (set.has name lineage) project) (get@ #//.parents profile))] (in (list\fold (function (_ parent child) (\ //.monoid compose child parent)) diff --git a/stdlib/source/program/compositor.lux b/stdlib/source/program/compositor.lux index a88eb93a5..849c5b89a 100644 --- a/stdlib/source/program/compositor.lux +++ b/stdlib/source/program/compositor.lux @@ -108,7 +108,7 @@ (do ! [content (\ fs read head)] (recur tail - (dictionary.put head content output))))))) + (dictionary.has head content output))))))) (with_expansions [ (as_is anchor expression artifact)] (def: .public (compiler static -- cgit v1.2.3