From 9f039e8a0a09e0278547d697efa018cd3fd68672 Mon Sep 17 00:00:00 2001 From: Eduardo Julian Date: Fri, 30 Jul 2021 01:12:05 -0400 Subject: More renamings. --- .../source/program/aedifex/artifact/versioning.lux | 6 +-- stdlib/source/program/aedifex/command/auto.lux | 2 +- stdlib/source/program/aedifex/command/build.lux | 4 +- .../program/aedifex/dependency/resolution.lux | 6 +-- .../source/program/aedifex/metadata/snapshot.lux | 6 +-- stdlib/source/program/aedifex/parser.lux | 44 +++++++++++----------- stdlib/source/program/aedifex/pom.lux | 14 +++---- 7 files changed, 41 insertions(+), 41 deletions(-) (limited to 'stdlib/source/program/aedifex') diff --git a/stdlib/source/program/aedifex/artifact/versioning.lux b/stdlib/source/program/aedifex/artifact/versioning.lux index 37adedea1..44973b54e 100644 --- a/stdlib/source/program/aedifex/artifact/versioning.lux +++ b/stdlib/source/program/aedifex/artifact/versioning.lux @@ -84,9 +84,9 @@ (Parser Versioning) (<| (.node ..) ($_ <>.and - (<>.default #//snapshot.Local (.somewhere //snapshot.parser)) - (<>.default //time.epoch (.somewhere ..last_updated_parser)) - (<| (<>.default (list)) + (<>.else #//snapshot.Local (.somewhere //snapshot.parser)) + (<>.else //time.epoch (.somewhere ..last_updated_parser)) + (<| (<>.else (list)) .somewhere (.node ..) (<>.some //snapshot/version.parser)) diff --git a/stdlib/source/program/aedifex/command/auto.lux b/stdlib/source/program/aedifex/command/auto.lux index 994f192fe..975ee26ba 100644 --- a/stdlib/source/program/aedifex/command/auto.lux +++ b/stdlib/source/program/aedifex/command/auto.lux @@ -30,7 +30,7 @@ (let [! async.monad] (|> path (\ fs sub_directories) - (\ ! map (|>> (try.default (list)) + (\ ! map (|>> (try.else (list)) (monad.map ! (targets fs)))) (\ ! join) (\ ! map (|>> list.concat (list& path)))))) diff --git a/stdlib/source/program/aedifex/command/build.lux b/stdlib/source/program/aedifex/command/build.lux index b675bb5cd..072e6e094 100644 --- a/stdlib/source/program/aedifex/command/build.lux +++ b/stdlib/source/program/aedifex/command/build.lux @@ -233,8 +233,8 @@ Bit (|> (java/lang/System::getProperty "os.name") io.run - (try.default "") - text.lower_case + (try.else "") + text.lower_cased (text.starts_with? "windows"))) (def: jvm_class_path_separator diff --git a/stdlib/source/program/aedifex/dependency/resolution.lux b/stdlib/source/program/aedifex/dependency/resolution.lux index 3bd510675..97ed8eb4c 100644 --- a/stdlib/source/program/aedifex/dependency/resolution.lux +++ b/stdlib/source/program/aedifex/dependency/resolution.lux @@ -90,7 +90,7 @@ actual (|> output (text.split_all_with " ") list.head - (maybe.default output) + (maybe.else output) (\ codec decode)) _ (exception.assert exception [artifact extension output] (\ ///hash.equivalence = (hash library) actual))] @@ -233,12 +233,12 @@ [#let [sub_dependencies (|> package ///package.dependencies (try\map set.to_list) - (try.default (list))) + (try.else (list))) ## For security reasons, it's not a good idea to allow dependencies to introduce repositories. ## package_repositories (|> package ## ///package.repositories ## (try\map set.to_list) - ## (try.default (list)) + ## (try.else (list)) ## (list\map new_repository)) ## sub_repositories (list\compose repositories package_repositories) sub_repositories repositories] diff --git a/stdlib/source/program/aedifex/metadata/snapshot.lux b/stdlib/source/program/aedifex/metadata/snapshot.lux index c96957740..6a9d812c9 100644 --- a/stdlib/source/program/aedifex/metadata/snapshot.lux +++ b/stdlib/source/program/aedifex/metadata/snapshot.lux @@ -103,9 +103,9 @@ versions versions))))) - (<>.default {#///artifact/versioning.snapshot #///artifact/snapshot.Local - #///artifact/versioning.last_updated ///artifact/time.epoch - #///artifact/versioning.versions (list )})))] + (<>.else {#///artifact/versioning.snapshot #///artifact/snapshot.Local + #///artifact/versioning.last_updated ///artifact/time.epoch + #///artifact/versioning.versions (list )})))] (in {#artifact {#///artifact.group group #///artifact.name name #///artifact.version version} diff --git a/stdlib/source/program/aedifex/parser.lux b/stdlib/source/program/aedifex/parser.lux index ca5fe3be3..49384a986 100644 --- a/stdlib/source/program/aedifex/parser.lux +++ b/stdlib/source/program/aedifex/parser.lux @@ -89,10 +89,10 @@ ($_ <>.and (..singular input "name" ..name) (..singular input "url" ..url) - (<>.default #/.Repo - (..singular input "type" - (<>.or (.this! (' #repo)) - (.this! (' #manual)))))))) + (<>.else #/.Repo + (..singular input "type" + (<>.or (.this! (' #repo)) + (.this! (' #manual)))))))) (def: organization (Parser /.Organization) @@ -133,10 +133,10 @@ (<>.maybe (..singular input "url" ..url)) (<>.maybe (..singular input "scm" ..scm)) (<>.maybe (..singular input "description" ..description)) - (<>.default (list) (..plural input "licenses" ..license)) + (<>.else (list) (..plural input "licenses" ..license)) (<>.maybe (..singular input "organization" ..organization)) - (<>.default (list) (..plural input "developers" ..developer)) - (<>.default (list) (..plural input "contributors" ..contributor)) + (<>.else (list) (..plural input "developers" ..developer)) + (<>.else (list) (..plural input "contributors" ..contributor)) ))) (def: repository @@ -152,7 +152,7 @@ (.tuple ($_ <>.and ..artifact' - (<>.default //artifact/type.lux_library ..type) + (<>.else //artifact/type.lux_library ..type) ))) (def: source @@ -186,8 +186,8 @@ (.record (<>.some (<>.and .local_tag .any)))) #let [^parents (: (Parser (List /.Name)) - (<>.default (list) - (..plural input "parents" .text))) + (<>.else (list) + (..plural input "parents" .text))) ^identity (: (Parser (Maybe Artifact)) (<>.maybe (..singular input "identity" ..artifact))) @@ -197,23 +197,23 @@ ^repositories (: (Parser (Set //repository.Address)) (|> (..plural input "repositories" ..repository) (\ ! map (set.of_list text.hash)) - (<>.default (set.new text.hash)) + (<>.else (set.new text.hash)) (\ ! map (set.add /.default_repository)))) ^dependencies (: (Parser (Set //dependency.Dependency)) (|> (..plural input "dependencies" ..dependency) (\ ! map (set.of_list //dependency.hash)) - (<>.default (set.new //dependency.hash)))) + (<>.else (set.new //dependency.hash)))) ^compiler (|> ..dependency (..singular input "compiler") - (<>.default /.default_compiler)) + (<>.else /.default_compiler)) ^sources (: (Parser (Set /.Source)) (|> (..plural input "sources" ..source) (\ ! map (set.of_list text.hash)) - (<>.default (set.of_list text.hash (list /.default_source))))) + (<>.else (set.of_list text.hash (list /.default_source))))) ^target (: (Parser /.Target) (|> ..target (..singular input "target") - (<>.default /.default_target))) + (<>.else /.default_target))) ^program (: (Parser (Maybe Module)) (<>.maybe (..singular input "program" ..module))) @@ -222,23 +222,23 @@ (..singular input "test" ..module))) ^deploy_repositories (: (Parser (Dictionary Text //repository.Address)) (<| (\ ! map (dictionary.of_list text.hash)) - (<>.default (list)) + (<>.else (list)) (..singular input "deploy_repositories" ..deploy_repository))) ^java (|> ..runtime (..singular input "java") - (<>.default //runtime.default_java)) + (<>.else //runtime.default_java)) ^js (|> ..runtime (..singular input "js") - (<>.default //runtime.default_js)) + (<>.else //runtime.default_js)) ^python (|> ..runtime (..singular input "python") - (<>.default //runtime.default_python)) + (<>.else //runtime.default_python)) ^lua (|> ..runtime (..singular input "lua") - (<>.default //runtime.default_lua)) + (<>.else //runtime.default_lua)) ^ruby (|> ..runtime (..singular input "ruby") - (<>.default //runtime.default_ruby))]] + (<>.else //runtime.default_ruby))]] ($_ <>.and ^parents ^identity @@ -262,7 +262,7 @@ (Parser Project) (let [default_profile (: (Parser Project) (\ <>.monad map - (|>> [/.default] (list) (dictionary.of_list text.hash)) + (|>> [/.else] (list) (dictionary.of_list text.hash)) ..profile)) multi_profile (: (Parser Project) (\ <>.monad map diff --git a/stdlib/source/program/aedifex/pom.lux b/stdlib/source/program/aedifex/pom.lux index 145d65f6e..e37bbe0e9 100644 --- a/stdlib/source/program/aedifex/pom.lux +++ b/stdlib/source/program/aedifex/pom.lux @@ -114,7 +114,7 @@ (-> /.Developer (List XML)) (list& (..property "name" name) (..property "email" email) - (|> organization (maybe\map ..developer_organization) (maybe.default (list))))) + (|> organization (maybe\map ..developer_organization) (maybe.else (list))))) (template [ ] [(def: @@ -177,12 +177,12 @@ #//artifact.name artifact #//artifact.version (|> properties (dictionary.get ["" ..version_tag]) - (maybe.default "") + (maybe.else "") (text.replace_all "${project.version}" own_version) (text.replace_all "${project.parent.version}" parent_version))} #//dependency.type (|> properties (dictionary.get ["" "type"]) - (maybe.default //artifact/type.jvm_library))}))))) + (maybe.else //artifact/type.jvm_library))}))))) (def: (dependencies_parser own_version parent_version) (-> Text Text (Parser (List Dependency))) @@ -213,16 +213,16 @@ (def: #export parser (Parser /.Profile) (do {! <>.monad} - [own_version (<>.default "" (.somewhere ..own_version)) - parent_version (<>.default "" (.somewhere ..parent_version))] + [own_version (<>.else "" (.somewhere ..own_version)) + parent_version (<>.else "" (.somewhere ..parent_version))] (<| (.node ["" ..project_tag]) (do ! [dependencies (|> (..dependencies_parser own_version parent_version) .somewhere - (<>.default (list))) + (<>.else (list))) repositories (|> ..repositories_parser .somewhere - (<>.default (list))) + (<>.else (list))) _ (<>.some .ignore)] (in (|> (\ /.monoid identity) (update@ #/.dependencies (function (_ empty) -- cgit v1.2.3