From 464b6e8f5e6c62f58fa8c7ff61ab2ad215e98bd1 Mon Sep 17 00:00:00 2001 From: Eduardo Julian Date: Mon, 9 Aug 2021 23:02:01 -0400 Subject: Improved single-line comment syntax (from "##" to "..."). --- stdlib/source/program/aedifex/artifact.lux | 2 +- .../source/program/aedifex/artifact/extension.lux | 2 +- .../aedifex/artifact/snapshot/version/value.lux | 6 ++-- stdlib/source/program/aedifex/artifact/type.lux | 2 +- stdlib/source/program/aedifex/cli.lux | 16 +++++------ stdlib/source/program/aedifex/command/auto.lux | 2 +- stdlib/source/program/aedifex/command/build.lux | 18 ++++++------ .../program/aedifex/dependency/deployment.lux | 6 ++-- .../program/aedifex/dependency/resolution.lux | 16 +++++------ stdlib/source/program/aedifex/hash.lux | 14 +++++----- stdlib/source/program/aedifex/metadata.lux | 4 +-- stdlib/source/program/aedifex/pom.lux | 6 ++-- stdlib/source/program/aedifex/profile.lux | 32 +++++++++++----------- stdlib/source/program/aedifex/repository/local.lux | 4 +-- stdlib/source/program/aedifex/runtime.lux | 2 +- 15 files changed, 66 insertions(+), 66 deletions(-) (limited to 'stdlib/source/program/aedifex') diff --git a/stdlib/source/program/aedifex/artifact.lux b/stdlib/source/program/aedifex/artifact.lux index ec955d4dd..a6980813e 100644 --- a/stdlib/source/program/aedifex/artifact.lux +++ b/stdlib/source/program/aedifex/artifact.lux @@ -95,7 +95,7 @@ (let [/ uri.separator group (..directory / (get@ #group artifact)) name (get@ #name artifact) - ## version (get@ #version artifact) + ... version (get@ #version artifact) identity (..identity artifact)] (%.format group / name / version / identity))) diff --git a/stdlib/source/program/aedifex/artifact/extension.lux b/stdlib/source/program/aedifex/artifact/extension.lux index 11a94bb7e..130dda74e 100644 --- a/stdlib/source/program/aedifex/artifact/extension.lux +++ b/stdlib/source/program/aedifex/artifact/extension.lux @@ -21,7 +21,7 @@ (def: .public type (-> Extension //.Type) - (text.replace_all ..separator "")) + (text.replaced ..separator "")) (template [] [(def: .public diff --git a/stdlib/source/program/aedifex/artifact/snapshot/version/value.lux b/stdlib/source/program/aedifex/artifact/snapshot/version/value.lux index 55ece62c7..63681a3fe 100644 --- a/stdlib/source/program/aedifex/artifact/snapshot/version/value.lux +++ b/stdlib/source/program/aedifex/artifact/snapshot/version/value.lux @@ -36,8 +36,8 @@ (#///.Remote stamp) (let [(^slots [#///stamp.time #///stamp.build]) stamp] - (%.format (text.replace_all ..snapshot - (///time.format time) - version) + (%.format (text.replaced ..snapshot + (///time.format time) + version) ..separator (%.nat build))))) diff --git a/stdlib/source/program/aedifex/artifact/type.lux b/stdlib/source/program/aedifex/artifact/type.lux index dde76fc0c..ae6f9b79b 100644 --- a/stdlib/source/program/aedifex/artifact/type.lux +++ b/stdlib/source/program/aedifex/artifact/type.lux @@ -2,7 +2,7 @@ [library [lux (#- Type)]]) -## https://maven.apache.org/ref/3.6.3/maven-core/artifact-handlers.html +... https://maven.apache.org/ref/3.6.3/maven-core/artifact-handlers.html (type: .public Type Text) diff --git a/stdlib/source/program/aedifex/cli.lux b/stdlib/source/program/aedifex/cli.lux index 8e97e02d3..7f9fe61ff 100644 --- a/stdlib/source/program/aedifex/cli.lux +++ b/stdlib/source/program/aedifex/cli.lux @@ -48,24 +48,24 @@ (def: .public equivalence (Equivalence Command) ($_ sum.equivalence - ## #Version + ... #Version ..any_equivalence - ## #Clean + ... #Clean ..any_equivalence - ## #POM + ... #POM ..any_equivalence - ## #Dependencies + ... #Dependencies ..any_equivalence - ## #Install + ... #Install ..any_equivalence - ## #Deploy + ... #Deploy ($_ product.equivalence text.equivalence text.equivalence text.equivalence) - ## #Compilation + ... #Compilation ..compilation_equivalence - ## #Auto + ... #Auto ..compilation_equivalence)) (def: command' diff --git a/stdlib/source/program/aedifex/command/auto.lux b/stdlib/source/program/aedifex/command/auto.lux index 2c4c8ac19..579f68462 100644 --- a/stdlib/source/program/aedifex/command/auto.lux +++ b/stdlib/source/program/aedifex/command/auto.lux @@ -41,7 +41,7 @@ (def: (pause delay) (-> Nat (Async (Try Any))) - (async.delay delay (#try.Success []))) + (async.delayed delay (#try.Success []))) (def: .public (do! delay watcher command) (All [a] diff --git a/stdlib/source/program/aedifex/command/build.lux b/stdlib/source/program/aedifex/command/build.lux index ff7825678..00380e59b 100644 --- a/stdlib/source/program/aedifex/command/build.lux +++ b/stdlib/source/program/aedifex/command/build.lux @@ -115,7 +115,7 @@ artifact (get@ #///dependency.artifact dependency)] (|> artifact (///local.uri (get@ #///artifact.version artifact)) - (text.replace_all uri.separator /) + (text.replaced uri.separator /) (format home /) (text.suffix (format "." (get@ #///dependency.type dependency)))))) @@ -193,29 +193,29 @@ (template [ ] [(def: .public ( console process) (-> (Console Async) (Process Async) (Async (Try Any))) - ## This is a very odd way of implementing this function. - ## But it's written this way because the more straightforward way (i.e. by using (try.with async.monad)) - ## eventually led to the function hanging/freezing. - ## I'm not sure why it happened, but I got this weirder implementation to work. + ... This is a very odd way of implementing this function. + ... But it's written this way because the more straightforward way (i.e. by using (try.with async.monad)) + ... eventually led to the function hanging/freezing. + ... I'm not sure why it happened, but I got this weirder implementation to work. (let [[read! write!] (: [(Async (Try Any)) (async.Resolver (Try Any))] (async.async [])) _ (|> (\ process []) - (async.await (function (recur ?line) + (async.upon! (function (recur ?line) (case ?line (#try.Failure error) (if (exception.match? shell.no_more_output error) (write! (#try.Success [])) - (async.await write! (console.write_line error console))) + (async.upon! write! (console.write_line error console))) (#try.Success line) - (async.await (function (_ outcome) + (async.upon! (function (_ outcome) (case outcome (#try.Failure error) (write! (#try.Failure error)) (#try.Success _) - (async.await recur + (async.upon! recur (\ process [])))) (console.write_line line console))))) io.run)] diff --git a/stdlib/source/program/aedifex/dependency/deployment.lux b/stdlib/source/program/aedifex/dependency/deployment.lux index 6ff052a5a..d23e4a805 100644 --- a/stdlib/source/program/aedifex/dependency/deployment.lux +++ b/stdlib/source/program/aedifex/dependency/deployment.lux @@ -110,9 +110,9 @@ {#///artifact/snapshot/version/value.version version_template #///artifact/snapshot/version/value.snapshot versioning_snapshot}) #///artifact/snapshot/version.updated now})) - ## (set@ [#///metadata/snapshot.versioning #///artifact/versioning.snapshot] - ## (list\compose (..artifacts type (product.right (get@ #///package.library package))) - ## (..artifacts ///artifact/type.pom (product.right (get@ #///package.pom package))))) + ... (set@ [#///metadata/snapshot.versioning #///artifact/versioning.snapshot] + ... (list\compose (..artifacts type (product.right (get@ #///package.library package))) + ... (..artifacts ///artifact/type.pom (product.right (get@ #///package.pom package))))) )))) (def: .public (one repository [artifact type] package) diff --git a/stdlib/source/program/aedifex/dependency/resolution.lux b/stdlib/source/program/aedifex/dependency/resolution.lux index c34d88494..ed4303ac5 100644 --- a/stdlib/source/program/aedifex/dependency/resolution.lux +++ b/stdlib/source/program/aedifex/dependency/resolution.lux @@ -214,7 +214,7 @@ (#.Item head tail) (case (get@ [#//.artifact #///artifact.version] head) - ## Skip if there is no version + ... Skip if there is no version "" (recur repositories successes failures @@ -234,13 +234,13 @@ ///package.dependencies (try\map set.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.list) - ## (try.else (list)) - ## (list\map new_repository)) - ## sub_repositories (list\compose repositories package_repositories) + ... For security reasons, it's not a good idea to allow dependencies to introduce repositories. + ... package_repositories (|> package + ... ///package.repositories + ... (try\map set.list) + ... (try.else (list)) + ... (list\map new_repository)) + ... sub_repositories (list\compose repositories package_repositories) sub_repositories repositories] [successes failures resolution] (recur sub_repositories (#.Item head successes) diff --git a/stdlib/source/program/aedifex/hash.lux b/stdlib/source/program/aedifex/hash.lux index 95247c471..2e46286ea 100644 --- a/stdlib/source/program/aedifex/hash.lux +++ b/stdlib/source/program/aedifex/hash.lux @@ -21,9 +21,9 @@ [type abstract]]]) -## TODO: Replace with pure-Lux implementations of these algorithms -## https://en.wikipedia.org/wiki/SHA-1#SHA-1_pseudocode -## https://en.wikipedia.org/wiki/MD5#Algorithm +... TODO: Replace with pure-Lux implementations of these algorithms +... https://en.wikipedia.org/wiki/SHA-1#SHA-1_pseudocode +... https://en.wikipedia.org/wiki/MD5#Algorithm (import: java/lang/String) (import: java/security/MessageDigest @@ -127,7 +127,7 @@ (#.Some [head tail]) (do try.monad [head (\ n.hex decode head) - output (binary.write/64 index head output)] + output (binary.write/64! index head output)] (recur tail (inc chunk) output)) #.None @@ -139,9 +139,9 @@ [head (\ n.hex decode input) output ( index head output)] (constructor output))]) - ([1 binary.write/8] - [2 binary.write/16] - [4 binary.write/32]) + ([1 binary.write/8!] + [2 binary.write/16!] + [4 binary.write/32!]) _ (exception.except ..not_a_hash [(..encoding_size size) encoded]))))) (exception.except ..not_a_hash [(..encoding_size size) encoded])))) diff --git a/stdlib/source/program/aedifex/metadata.lux b/stdlib/source/program/aedifex/metadata.lux index 7b883e4f8..5badc4783 100644 --- a/stdlib/source/program/aedifex/metadata.lux +++ b/stdlib/source/program/aedifex/metadata.lux @@ -36,8 +36,8 @@ (def: .public (local_uri remote_uri) (-> URI URI) - (text.replace_once ..remote_file ..local_file remote_uri)) + (text.replaced/1 ..remote_file ..local_file remote_uri)) (def: .public (remote_uri local_uri) (-> URI URI) - (text.replace_once ..local_file ..remote_file local_uri)) + (text.replaced/1 ..local_file ..remote_file local_uri)) diff --git a/stdlib/source/program/aedifex/pom.lux b/stdlib/source/program/aedifex/pom.lux index 13900d276..e2ad11079 100644 --- a/stdlib/source/program/aedifex/pom.lux +++ b/stdlib/source/program/aedifex/pom.lux @@ -29,7 +29,7 @@ ["#." artifact (#+ Artifact) ["#/." type]]]) -## https://maven.apache.org/pom.html +... https://maven.apache.org/pom.html (def: project_tag "project") (def: dependency_tag "dependency") @@ -178,8 +178,8 @@ #//artifact.version (|> properties (dictionary.get ["" ..version_tag]) (maybe.else "") - (text.replace_all "${project.version}" own_version) - (text.replace_all "${project.parent.version}" parent_version))} + (text.replaced "${project.version}" own_version) + (text.replaced "${project.parent.version}" parent_version))} #//dependency.type (|> properties (dictionary.get ["" "type"]) (maybe.else //artifact/type.jvm_library))}))))) diff --git a/stdlib/source/program/aedifex/profile.lux b/stdlib/source/program/aedifex/profile.lux index 93eeec473..ffd549c06 100644 --- a/stdlib/source/program/aedifex/profile.lux +++ b/stdlib/source/program/aedifex/profile.lux @@ -174,37 +174,37 @@ (def: .public equivalence (Equivalence Profile) ($_ product.equivalence - ## #parents + ... #parents (list.equivalence text.equivalence) - ## #identity + ... #identity (maybe.equivalence artifact.equivalence) - ## #info + ... #info (maybe.equivalence ..info_equivalence) - ## #repositories + ... #repositories set.equivalence - ## #dependencies + ... #dependencies set.equivalence - ## #compiler + ... #compiler dependency.equivalence - ## #sources + ... #sources set.equivalence - ## #target + ... #target text.equivalence - ## #program + ... #program (maybe.equivalence text.equivalence) - ## #test + ... #test (maybe.equivalence text.equivalence) - ## #deploy_repositories + ... #deploy_repositories (dictionary.equivalence text.equivalence) - ## #java + ... #java runtime.equivalence - ## #js + ... #js runtime.equivalence - ## #python + ... #python runtime.equivalence - ## #lua + ... #lua runtime.equivalence - ## #ruby + ... #ruby runtime.equivalence)) (implementation: .public monoid diff --git a/stdlib/source/program/aedifex/repository/local.lux b/stdlib/source/program/aedifex/repository/local.lux index f59a04b85..907610233 100644 --- a/stdlib/source/program/aedifex/repository/local.lux +++ b/stdlib/source/program/aedifex/repository/local.lux @@ -23,12 +23,12 @@ (def: (root program /) (-> (Program Async) Text file.Path) (|> ///local.repository - (text.replace_all uri.separator /) + (text.replaced uri.separator /) (format (\ program home) /))) (def: (path /) (-> Text (-> URI file.Path)) - (text.replace_all uri.separator /)) + (text.replaced uri.separator /)) (def: (absolute_path program /) (-> (Program Async) Text (-> URI file.Path)) diff --git a/stdlib/source/program/aedifex/runtime.lux b/stdlib/source/program/aedifex/runtime.lux index 842708e44..b239d03ea 100644 --- a/stdlib/source/program/aedifex/runtime.lux +++ b/stdlib/source/program/aedifex/runtime.lux @@ -34,7 +34,7 @@ [default_js "node" ["--stack_size=8192"]] [default_python "python3" []] [default_lua "lua" []] - ## [default_ruby "RUBY_THREAD_VM_STACK_SIZE=15700000 ruby" []] + ... [default_ruby "RUBY_THREAD_VM_STACK_SIZE=15700000 ruby" []] [default_ruby "ruby" []] ) -- cgit v1.2.3