diff options
Diffstat (limited to 'stdlib/source/program/aedifex')
33 files changed, 336 insertions, 336 deletions
diff --git a/stdlib/source/program/aedifex/artifact/snapshot.lux b/stdlib/source/program/aedifex/artifact/snapshot.lux index 5ac1e126a..16e10286e 100644 --- a/stdlib/source/program/aedifex/artifact/snapshot.lux +++ b/stdlib/source/program/aedifex/artifact/snapshot.lux @@ -17,7 +17,7 @@ (type: .public Snapshot (Variant - #Local + {#Local} {#Remote Stamp})) (implementation: any_equivalence @@ -45,9 +45,9 @@ (def: local_copy_format XML - {#xml.Node <local_copy> + {xml.#Node <local_copy> xml.attributes - (list {#xml.Text ..local_copy_value})}) + (list {xml.#Text ..local_copy_value})}) (def: local_copy_parser (Parser Any) @@ -57,9 +57,9 @@ (def: .public (format snapshot) (-> Snapshot XML) - (<| {#xml.Node ..<snapshot> xml.attributes} + (<| {xml.#Node ..<snapshot> xml.attributes} (case snapshot - #Local + {#Local} (list ..local_copy_format) {#Remote stamp} diff --git a/stdlib/source/program/aedifex/artifact/snapshot/build.lux b/stdlib/source/program/aedifex/artifact/snapshot/build.lux index 4960f5862..44adcc18b 100644 --- a/stdlib/source/program/aedifex/artifact/snapshot/build.lux +++ b/stdlib/source/program/aedifex/artifact/snapshot/build.lux @@ -31,9 +31,9 @@ (def: .public format (-> Build XML) (|>> %.nat - #xml.Text + {xml.#Text} list - {#xml.Node ..tag xml.attributes})) + {xml.#Node ..tag xml.attributes})) (def: .public parser (Parser Build) diff --git a/stdlib/source/program/aedifex/artifact/snapshot/stamp.lux b/stdlib/source/program/aedifex/artifact/snapshot/stamp.lux index a840bd3c0..f5a08e942 100644 --- a/stdlib/source/program/aedifex/artifact/snapshot/stamp.lux +++ b/stdlib/source/program/aedifex/artifact/snapshot/stamp.lux @@ -35,9 +35,9 @@ (def: time_format (-> Time XML) (|>> //time.format - {#xml.Text} + {xml.#Text} list - {#xml.Node ..<timestamp> xml.attributes})) + {xml.#Node ..<timestamp> xml.attributes})) (def: .public (format (^slots [#time #build])) (-> Stamp (List XML)) diff --git a/stdlib/source/program/aedifex/artifact/snapshot/version.lux b/stdlib/source/program/aedifex/artifact/snapshot/version.lux index 2dac99df9..194956419 100644 --- a/stdlib/source/program/aedifex/artifact/snapshot/version.lux +++ b/stdlib/source/program/aedifex/artifact/snapshot/version.lux @@ -43,11 +43,11 @@ (def: (text_format tag value) (-> xml.Tag Text XML) - (|> value #xml.Text list {#xml.Node tag xml.attributes})) + (|> value {xml.#Text} list {xml.#Node tag xml.attributes})) (def: .public (format (^slots [#extension #value #updated])) (-> Version XML) - (<| {#xml.Node ..<snapshot_version> xml.attributes} + (<| {xml.#Node ..<snapshot_version> xml.attributes} (list (..text_format ..<extension> extension) (..text_format ..<value> value) (..text_format ..<updated> (///time.format updated))))) diff --git a/stdlib/source/program/aedifex/artifact/snapshot/version/value.lux b/stdlib/source/program/aedifex/artifact/snapshot/version/value.lux index 5f1816b3e..12fe26c46 100644 --- a/stdlib/source/program/aedifex/artifact/snapshot/version/value.lux +++ b/stdlib/source/program/aedifex/artifact/snapshot/version/value.lux @@ -32,11 +32,11 @@ (def: .public (format (^slots [#version #snapshot])) (%.Format Value) (case snapshot - #///.Local + {///.#Local} version - {#///.Remote stamp} - (let [(^slots [#///stamp.time #///stamp.build]) stamp] + {///.#Remote stamp} + (let [(^slots [///stamp.#time ///stamp.#build]) stamp] (%.format (text.replaced ..snapshot (///time.format time) version) diff --git a/stdlib/source/program/aedifex/artifact/time/date.lux b/stdlib/source/program/aedifex/artifact/time/date.lux index 167d0d2a2..3eeda23f0 100644 --- a/stdlib/source/program/aedifex/artifact/time/date.lux +++ b/stdlib/source/program/aedifex/artifact/time/date.lux @@ -51,7 +51,7 @@ (if (or (i.< ..min_year year) (i.> ..max_year year)) (exception.except ..year_is_out_of_range [(date.year raw)]) - {#try.Success (:abstraction raw)}))) + {try.#Success (:abstraction raw)}))) (def: .public value (-> Date date.Date) diff --git a/stdlib/source/program/aedifex/artifact/time/time.lux b/stdlib/source/program/aedifex/artifact/time/time.lux index c27b1b69c..8b3258c3a 100644 --- a/stdlib/source/program/aedifex/artifact/time/time.lux +++ b/stdlib/source/program/aedifex/artifact/time/time.lux @@ -21,10 +21,10 @@ (def: .public (format value) (%.Format Time) - (let [(^slots [#time.hour #time.minute #time.second]) (time.clock value)] - (%.format (//.pad hour) - (//.pad minute) - (//.pad second)))) + (let [(^slots [time.#hour time.#minute time.#second]) (time.clock value)] + (%.format (//.pad #hour) + (//.pad #minute) + (//.pad #second)))) (def: .public parser (<text>.Parser Time) @@ -33,7 +33,7 @@ minute (<>.codec n.decimal (<text>.exactly 2 <text>.decimal)) second (<>.codec n.decimal (<text>.exactly 2 <text>.decimal))] (<>.lifted (time.time - [#time.hour hour - #time.minute minute - #time.second second - #time.milli_second 0])))) + [time.#hour hour + time.#minute minute + time.#second second + time.#milli_second 0])))) diff --git a/stdlib/source/program/aedifex/artifact/versioning.lux b/stdlib/source/program/aedifex/artifact/versioning.lux index cf30987d2..dbac91543 100644 --- a/stdlib/source/program/aedifex/artifact/versioning.lux +++ b/stdlib/source/program/aedifex/artifact/versioning.lux @@ -36,7 +36,7 @@ #versions (List Version)])) (def: .public init - [#snapshot #//snapshot.Local + [#snapshot {//snapshot.#Local} #last_updated //time.epoch #versions (list)]) @@ -59,16 +59,16 @@ (def: last_updated_format (-> //time.Time XML) - (|>> //time.format #xml.Text list {#xml.Node ..<last_updated> xml.attributes})) + (|>> //time.format {xml.#Text} list {xml.#Node ..<last_updated> xml.attributes})) (def: .public (format (^slots [#snapshot #last_updated #versions])) (-> Versioning XML) - (<| {#xml.Node ..<versioning> xml.attributes} + (<| {xml.#Node ..<versioning> xml.attributes} (list (//snapshot.format snapshot) (..last_updated_format last_updated) (|> versions (list\each //snapshot/version.format) - {#xml.Node ..<snapshot_versions> xml.attributes})))) + {xml.#Node ..<snapshot_versions> xml.attributes})))) (def: (text tag) (-> xml.Tag (Parser Text)) @@ -84,7 +84,7 @@ (Parser Versioning) (<| (<xml>.node ..<versioning>) ($_ <>.and - (<>.else #//snapshot.Local (<xml>.somewhere //snapshot.parser)) + (<>.else {//snapshot.#Local} (<xml>.somewhere //snapshot.parser)) (<>.else //time.epoch (<xml>.somewhere ..last_updated_parser)) (<| (<>.else (list)) <xml>.somewhere diff --git a/stdlib/source/program/aedifex/cli.lux b/stdlib/source/program/aedifex/cli.lux index fc4cf5440..bf02c76cd 100644 --- a/stdlib/source/program/aedifex/cli.lux +++ b/stdlib/source/program/aedifex/cli.lux @@ -18,8 +18,8 @@ (type: .public Compilation (Variant - #Build - #Test)) + {#Build} + {#Test})) (implementation: any_equivalence (Equivalence Any) @@ -39,11 +39,11 @@ (type: .public Command (Variant - #Version - #Clean - #POM - #Dependencies - #Install + {#Version} + {#Clean} + {#POM} + {#Dependencies} + {#Install} {#Deploy Text Identity} {#Compilation Compilation} {#Auto Compilation})) @@ -97,7 +97,7 @@ (do <>.monad [head cli.any [tail command] command] - (in [{#.Item head tail} command]))) + (in [{.#Item head tail} command]))) (\ <>.monad each (|>> [(list /.default)]) ..command') )))) diff --git a/stdlib/source/program/aedifex/command/auto.lux b/stdlib/source/program/aedifex/command/auto.lux index 0b82f4d81..2160398eb 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.after delay {#try.Success []})) + (async.after delay {try.#Success []})) (def: .public (do! delay watcher command) (All (_ a) @@ -53,7 +53,7 @@ (with_expansions [<call> ((command console program fs shell resolution) profile)] (do [! async.monad] [targets (|> profile - (value@ #///.sources) + (value@ ///.#sources) set.list (monad.each ! (..targets fs)) (\ ! each list.together))] @@ -65,10 +65,10 @@ [_ (..pause delay) events (\ watcher poll [])] (case events - {#.Item _} + {.#Item _} (do ! [_ <call>] (recur [])) - #.End + {.#End} (recur [])))))))))) diff --git a/stdlib/source/program/aedifex/command/build.lux b/stdlib/source/program/aedifex/command/build.lux index 63d2affb7..c16f7c9ef 100644 --- a/stdlib/source/program/aedifex/command/build.lux +++ b/stdlib/source/program/aedifex/command/build.lux @@ -49,10 +49,10 @@ (-> Group Name Finder) (|>> dictionary.entries (list.one (function (_ [dependency package]) - (if (and (text\= group (value@ [#///dependency.artifact #///artifact.group] dependency)) - (text\= name (value@ [#///dependency.artifact #///artifact.name] dependency))) - {#.Some dependency} - #.None))))) + (if (and (text\= group (value@ [///dependency.#artifact ///artifact.#group] dependency)) + (text\= name (value@ [///dependency.#artifact ///artifact.#name] dependency))) + {.#Some dependency} + {.#None}))))) (def: .public lux_group Group @@ -91,11 +91,11 @@ (-> Resolution Dependency (Try [Resolution Compiler])) (let [[[compiler_group compiler_name compiler_version] compiler_type] compiler_dependency] (case (..dependency_finder compiler_group compiler_name resolution) - {#.Some dependency} + {.#Some dependency} (case compiler_name (^template [<tag> <name>] [(^ (static <name>)) - {#try.Success [(..remove_dependency dependency resolution) + {try.#Success [(..remove_dependency dependency resolution) {<tag> dependency}]}]) ([#JVM ..jvm_compiler_name] [#JS ..js_compiler_name] @@ -112,17 +112,17 @@ (def: (path fs home dependency) (All (_ !) (-> (file.System !) Path Dependency Path)) (let [/ (\ fs separator) - artifact (value@ #///dependency.artifact dependency)] + artifact (value@ ///dependency.#artifact dependency)] (|> artifact - (///local.uri (value@ #///artifact.version artifact)) + (///local.uri (value@ ///artifact.#version artifact)) (text.replaced uri.separator /) (format home /) - (text.suffix (format "." (value@ #///dependency.type dependency)))))) + (text.suffix (format "." (value@ ///dependency.#type dependency)))))) (def: (libraries fs home) (All (_ !) (-> (file.System !) Path Resolution (List Path))) (|>> dictionary.keys - (list.only (|>> (value@ #///dependency.type) + (list.only (|>> (value@ ///dependency.#type) (text\= ///artifact/type.lux_library))) (list\each (..path fs home)))) @@ -139,39 +139,39 @@ (loop [left (text.all_split_by ..version_separator left) right (text.all_split_by ..version_separator right)] (case [left right] - [{#.Item leftH leftT} {#.Item rightH rightT}] + [{.#Item leftH leftT} {.#Item rightH rightT}] (if (text\= leftH rightH) (recur leftT rightT) (or (n.< (text.size leftH) (text.size rightH)) (text\< leftH rightH))) - [{#.Item leftH leftT} #.End] + [{.#Item leftH leftT} {.#End}] false - [#.End {#.Item rightH rightT}] + [{.#End} {.#Item rightH rightT}] true - [#.End #.End] + [{.#End} {.#End}] false)))) (def: .public (host_dependencies fs home) (All (_ !) (-> (file.System !) Path Resolution (List Path))) (|>> dictionary.keys - (list.only (|>> (value@ #///dependency.type) + (list.only (|>> (value@ ///dependency.#type) (text\= ///artifact/type.lux_library) not)) (list\mix (function (_ dependency uniques) - (let [artifact (value@ #///dependency.artifact dependency) - identity [(value@ #///artifact.group artifact) - (value@ #///artifact.name artifact)] - version (value@ #///artifact.version artifact)] + (let [artifact (value@ ///dependency.#artifact dependency) + identity [(value@ ///artifact.#group artifact) + (value@ ///artifact.#name artifact)] + version (value@ ///artifact.#version artifact)] (case (dictionary.value identity uniques) - {#.Some [current_version current_path]} + {.#Some [current_version current_path]} (if (\ version_order < version current_version) (dictionary.has identity [version dependency] uniques) uniques) - #.None + {.#None} (dictionary.has identity [version dependency] uniques)))) (: (Dictionary [Group Name] [Version Dependency]) (dictionary.empty (product.hash text.hash text.hash)))) @@ -203,18 +203,18 @@ _ (|> (\ process <capability> []) (async.upon! (function (recur ?line) (case ?line - {#try.Failure error} + {try.#Failure error} (if (exception.match? shell.no_more_output error) - (write! {#try.Success []}) + (write! {try.#Success []}) (async.upon! write! (console.write_line error console))) - {#try.Success line} + {try.#Success line} (async.upon! (function (_ outcome) (case outcome - {#try.Failure error} - (write! {#try.Failure error}) + {try.#Failure error} + (write! {try.#Failure error}) - {#try.Success _} + {try.#Success _} (async.upon! recur (\ process <capability> [])))) (console.write_line line console))))) @@ -245,41 +245,41 @@ (def: (jvm_class_path host_dependencies) (-> (List Path) Text) (|> host_dependencies - {#.Item "."} + {.#Item "."} (text.interposed ..jvm_class_path_separator))) (def: .public (with_jvm_class_path host_dependencies runtime) (-> (List Path) ///runtime.Runtime ///runtime.Runtime) (case host_dependencies - #.End + {.#End} runtime _ - (revised@ #///runtime.parameters + (revised@ ///runtime.#parameters (|>> (list& "-cp" (..jvm_class_path host_dependencies))) runtime))) (def: .public (do! console program fs shell resolution) (-> (Console Async) (Program Async) (file.System Async) (Shell Async) Resolution (Command [Exit Compiler Path])) (function (_ profile) - (let [target (value@ #///.target profile)] - (case (value@ #///.program profile) - #.None + (let [target (value@ ///.#target profile)] + (case (value@ ///.#program profile) + {.#None} (async\in (exception.except ..no_specified_program [])) - {#.Some program_module} + {.#Some program_module} (do async.monad [environment (program.environment async.monad program) .let [home (\ program home) working_directory (\ program directory)]] (do ///action.monad - [[resolution compiler] (async\in (..compiler resolution (value@ #///.compiler profile))) + [[resolution compiler] (async\in (..compiler resolution (value@ ///.#compiler profile))) .let [host_dependencies (..host_dependencies fs home resolution) [[command compiler_params] output] (case compiler {#JVM dependency} - [(|> (value@ #///.java profile) - (with@ #///runtime.parameters (list "program._")) - (with_jvm_class_path {#.Item (..path fs home dependency) host_dependencies})) + [(|> (value@ ///.#java profile) + (with@ ///runtime.#parameters (list "program._")) + (with_jvm_class_path {.#Item (..path fs home dependency) host_dependencies})) "program.jar"] (^template [<tag> <runtime> <program>] @@ -288,10 +288,10 @@ (..path fs home) (///runtime.for (value@ <runtime> profile))) <program>]]) - ([#JS #///.js "program.js"] - [#Python #///.java "program.py"] - [#Lua #///.java "program.lua"] - [#Ruby #///.java "program.rb"])) + ([#JS ///.#js "program.js"] + [#Python ///.#java "program.py"] + [#Lua ///.#java "program.lua"] + [#Ruby ///.#java "program.rb"])) / (\ fs separator) cache_directory (format working_directory / target)] _ (console.write_line ..start console) @@ -299,7 +299,7 @@ (list "build") (..plural "--library" (..libraries fs home resolution)) (..plural "--host_dependency" host_dependencies) - (..plural "--source" (set.list (value@ #///.sources profile))) + (..plural "--source" (set.list (value@ ///.#sources profile))) (..singular "--target" cache_directory) (..singular "--module" program_module)))] process (\ shell execute [environment diff --git a/stdlib/source/program/aedifex/command/clean.lux b/stdlib/source/program/aedifex/command/clean.lux index 232bde793..d175ae291 100644 --- a/stdlib/source/program/aedifex/command/clean.lux +++ b/stdlib/source/program/aedifex/command/clean.lux @@ -33,7 +33,7 @@ (def: .public (do! console fs profile) (-> (Console Async) (file.System Async) (Command Any)) (do [! async.monad] - [.let [target (value@ #///.target profile)] + [.let [target (value@ ///.#target profile)] ? (\ fs directory? target) _ (let [! ///action.monad] (if ? diff --git a/stdlib/source/program/aedifex/command/deploy.lux b/stdlib/source/program/aedifex/command/deploy.lux index 4d18f1b18..7210e9a30 100644 --- a/stdlib/source/program/aedifex/command/deploy.lux +++ b/stdlib/source/program/aedifex/command/deploy.lux @@ -60,7 +60,7 @@ (-> (Console Async) (Repository Async) (file.System Async) Artifact (Command Any)) (do [! ///action.monad] [library (|> profile - (value@ #/.sources) + (value@ /.#sources) set.list (export.library fs) (\ ! each (binary.result tar.writer))) @@ -71,10 +71,10 @@ (let [pom_data (|> pom (\ xml.codec encoded) (\ utf8.codec encoded))] - [#///package.origin {#///repository/origin.Remote ""} - #///package.library [library + [///package.#origin {///repository/origin.#Remote ""} + ///package.#library [library (///dependency/status.verified library)] - #///package.pom [pom + ///package.#pom [pom pom_data (///dependency/status.verified pom_data)]]))] (console.write_line ..success console))) diff --git a/stdlib/source/program/aedifex/command/deps.lux b/stdlib/source/program/aedifex/command/deps.lux index f26a76211..ed636efeb 100644 --- a/stdlib/source/program/aedifex/command/deps.lux +++ b/stdlib/source/program/aedifex/command/deps.lux @@ -33,16 +33,16 @@ (def: format (%.Format Dependency) - (|>> (value@ #///dependency.artifact) + (|>> (value@ ///dependency.#artifact) ///artifact.format %.text)) (def: .public (do! console local remotes new_repository profile) (-> (Console Async) (Repository Async) (List (Repository Async)) (-> URL (Repository Async)) (Command Resolution)) (do async.monad - [.let [dependencies (|> (value@ #///.dependencies profile) + [.let [dependencies (|> (value@ ///.#dependencies profile) set.list - {#.Item (value@ #///.compiler profile)})] + {.#Item (value@ ///.#compiler profile)})] [local_successes local_failures cache] (///dependency/resolution.all console (list local) new_repository diff --git a/stdlib/source/program/aedifex/command/install.lux b/stdlib/source/program/aedifex/command/install.lux index 65575f63f..4b413faa5 100644 --- a/stdlib/source/program/aedifex/command/install.lux +++ b/stdlib/source/program/aedifex/command/install.lux @@ -51,11 +51,11 @@ (def: .public (do! console fs repository profile) (-> (Console Async) (file.System Async) (Repository Async) (Command Any)) - (case (value@ #/.identity profile) - {#.Some identity} + (case (value@ /.#identity profile) + {.#Some identity} (do ///action.monad [package (|> profile - (value@ #/.sources) + (value@ /.#sources) set.list (export.library fs)) pom (|> profile @@ -66,10 +66,10 @@ (let [pom_data (|> pom (\ xml.codec encoded) (\ utf8.codec encoded))] - [#///package.origin {#///origin.Local ""} - #///package.library (let [library (binary.result tar.writer package)] + [///package.#origin {///origin.#Local ""} + ///package.#library (let [library (binary.result tar.writer package)] [library (///dependency/status.verified library)]) - #///package.pom [pom + ///package.#pom [pom pom_data (///dependency/status.verified pom_data)]]))] (console.write_line ..success console)) diff --git a/stdlib/source/program/aedifex/command/test.lux b/stdlib/source/program/aedifex/command/test.lux index 3e5cad3c6..04f4e8e27 100644 --- a/stdlib/source/program/aedifex/command/test.lux +++ b/stdlib/source/program/aedifex/command/test.lux @@ -36,25 +36,25 @@ (do [! ///action.monad] [.let [home (\ program home)] [build_exit compiler program] (//build.do! console program fs shell resolution - (with@ #///.program (value@ #///.test profile) profile))] + (with@ ///.#program (value@ ///.#test profile) profile))] (if (i.= shell.normal build_exit) (do ! [_ (console.write_line ..start console) .let [host_dependencies (//build.host_dependencies fs home resolution) [test_command test_parameters] (case compiler - {#//build.JVM dependency} + {//build.#JVM dependency} (|> program - (///runtime.for (value@ #///.java profile)) + (///runtime.for (value@ ///.#java profile)) (//build.with_jvm_class_path host_dependencies)) (^template [<tag> <runtime>] [{<tag> artifact} (///runtime.for (value@ <runtime> profile) program)]) - ([#//build.JS #///.js] - [#//build.Python #///.python] - [#//build.Lua #///.lua] - [#//build.Ruby #///.ruby]))] + ([//build.#JS ///.#js] + [//build.#Python ///.#python] + [//build.#Lua ///.#lua] + [//build.#Ruby ///.#ruby]))] process (\ shell execute [environment working_directory test_command diff --git a/stdlib/source/program/aedifex/dependency/deployment.lux b/stdlib/source/program/aedifex/dependency/deployment.lux index 84170965c..60fcd57d1 100644 --- a/stdlib/source/program/aedifex/dependency/deployment.lux +++ b/stdlib/source/program/aedifex/dependency/deployment.lux @@ -53,18 +53,18 @@ (do [! (try.with async.monad)] [_ (\ repository upload artifact data)] (case status - #///dependency/status.Unverified + {///dependency/status.#Unverified} (in []) - {#///dependency/status.Partial partial} + {///dependency/status.#Partial partial} (case partial - {#.Left sha-1} + {.#Left sha-1} (deploy_hash ///hash.sha-1_codec ///artifact/extension.sha-1 sha-1) - {#.Right md5} + {.#Right md5} (deploy_hash ///hash.md5_codec ///artifact/extension.md5 md5)) - {#///dependency/status.Verified sha-1 md5} + {///dependency/status.#Verified sha-1 md5} (do ! [_ (deploy_hash ///hash.sha-1_codec ///artifact/extension.sha-1 sha-1)] (deploy_hash ///hash.md5_codec ///artifact/extension.md5 md5)))))) @@ -75,15 +75,15 @@ <md5> (format type ///artifact/extension.md5)] (list& type (case status - #///dependency/status.Unverified + {///dependency/status.#Unverified} (list) - {#///dependency/status.Partial partial} + {///dependency/status.#Partial partial} (list (case partial - {#.Left _} <sha-1> - {#.Right _} <md5>)) + {.#Left _} <sha-1> + {.#Right _} <md5>)) - {#///dependency/status.Verified _} + {///dependency/status.#Verified _} (list <sha-1> <md5>))))) (def: (update_snapshot [artifact type] now snapshot) @@ -91,39 +91,39 @@ (do try.monad [now (: (Try ///artifact/time.Time) (///artifact/time.of_instant now)) - .let [version_template (value@ #///artifact.version artifact) + .let [version_template (value@ ///artifact.#version artifact) snapshot (|> snapshot - (revised@ [#///metadata/snapshot.versioning #///artifact/versioning.snapshot] + (revised@ [///metadata/snapshot.#versioning ///artifact/versioning.#snapshot] (function (_ snapshot) (case snapshot - #///artifact/snapshot.Local - #///artifact/snapshot.Local + {///artifact/snapshot.#Local} + {///artifact/snapshot.#Local} - {#///artifact/snapshot.Remote [_ build]} - {#///artifact/snapshot.Remote [now (++ build)]}))) - (with@ [#///metadata/snapshot.versioning #///artifact/versioning.last_updated] now)) - versioning_snapshot (value@ [#///metadata/snapshot.versioning #///artifact/versioning.snapshot] snapshot)]] + {///artifact/snapshot.#Remote [_ build]} + {///artifact/snapshot.#Remote [now (++ build)]}))) + (with@ [///metadata/snapshot.#versioning ///artifact/versioning.#last_updated] now)) + versioning_snapshot (value@ [///metadata/snapshot.#versioning ///artifact/versioning.#snapshot] snapshot)]] (in (|> snapshot - (with@ [#///metadata/snapshot.versioning #///artifact/versioning.versions] - (list [#///artifact/snapshot/version.extension type - #///artifact/snapshot/version.value (///artifact/snapshot/version/value.format - [#///artifact/snapshot/version/value.version version_template - #///artifact/snapshot/version/value.snapshot versioning_snapshot]) - #///artifact/snapshot/version.updated now])) - ... (with@ [#///metadata/snapshot.versioning #///artifact/versioning.snapshot] - ... (list\composite (..artifacts type (product.right (value@ #///package.library package))) - ... (..artifacts ///artifact/type.pom (product.right (value@ #///package.pom package))))) + (with@ [///metadata/snapshot.#versioning ///artifact/versioning.#versions] + (list [///artifact/snapshot/version.#extension type + ///artifact/snapshot/version.#value (///artifact/snapshot/version/value.format + [///artifact/snapshot/version/value.#version version_template + ///artifact/snapshot/version/value.#snapshot versioning_snapshot]) + ///artifact/snapshot/version.#updated now])) + ... (with@ [///metadata/snapshot.#versioning ///artifact/versioning.#snapshot] + ... (list\composite (..artifacts type (product.right (value@ ///package.#library package))) + ... (..artifacts ///artifact/type.pom (product.right (value@ ///package.#pom package))))) )))) (def: .public (one repository [artifact type] package) (-> (Repository Async) Dependency Package (Async (Try Artifact))) (do [! async.monad] [now (async.future instant.now) - .let [version_template (value@ #///artifact.version artifact)]] + .let [version_template (value@ ///artifact.#version artifact)]] (do (try.with !) - [_ (with_status repository version_template [artifact type] (value@ #///package.library package)) + [_ (with_status repository version_template [artifact type] (value@ ///package.#library package)) - _ (let [[pom pom_data status] (value@ #///package.pom package)] + _ (let [[pom pom_data status] (value@ ///package.#pom package)] (with_status repository version_template [artifact ///artifact/type.pom] @@ -135,8 +135,8 @@ _ (///metadata/snapshot.write repository artifact snapshot) project (///metadata/artifact.read repository artifact) _ (|> project - (with@ #///metadata/artifact.versions (list version_template)) - (with@ #///metadata/artifact.last_updated now) + (with@ ///metadata/artifact.#versions (list version_template)) + (with@ ///metadata/artifact.#last_updated now) (///metadata/artifact.write repository artifact))] (in artifact)))) diff --git a/stdlib/source/program/aedifex/dependency/resolution.lux b/stdlib/source/program/aedifex/dependency/resolution.lux index 3c8241595..12848cb58 100644 --- a/stdlib/source/program/aedifex/dependency/resolution.lux +++ b/stdlib/source/program/aedifex/dependency/resolution.lux @@ -85,7 +85,7 @@ (do async.monad [?actual (\ repository download (///repository/remote.uri version_template artifact extension))] (case ?actual - {#try.Success actual} + {try.#Success actual} (in (do [! try.monad] [output (\ ! each (for [@.old (|>> (:as java/lang/String) java/lang/String::trim @@ -99,10 +99,10 @@ (\ codec decoded)) _ (exception.assertion exception [artifact extension output] (\ ///hash.equivalence = (hash library) actual))] - (in {#.Some actual}))) + (in {.#Some actual}))) - {#try.Failure error} - (in {#try.Success #.None})))) + {try.#Failure error} + (in {try.#Success {.#None}})))) (def: (hashed repository version_template artifact extension) (-> (Repository Async) Version Artifact Extension (Async (Try [Binary Status]))) @@ -115,17 +115,17 @@ repository version_template artifact (format extension ///artifact/extension.md5) ///hash.md5 ///hash.md5_codec ..md5_does_not_match)] (in [data (case [?sha-1 ?md5] - [{#.Some sha-1} {#.Some md5}] - {#//status.Verified sha-1 md5} + [{.#Some sha-1} {.#Some md5}] + {//status.#Verified sha-1 md5} - [{#.Some sha-1} #.None] - {#//status.Partial {#.Left sha-1}} + [{.#Some sha-1} {.#None}] + {//status.#Partial {.#Left sha-1}} - [#.None {#.Some md5}] - {#//status.Partial {#.Right md5}} + [{.#None} {.#Some md5}] + {//status.#Partial {.#Right md5}} - [#.None #.None] - #//status.Unverified)]))) + [{.#None} {.#None}] + {//status.#Unverified})]))) (def: .public (one repository dependency) (-> (Repository Async) Dependency (Async (Try Package))) @@ -133,10 +133,10 @@ extension (///artifact/extension.extension type)] (do (try.with async.monad) [snapshot (///metadata/snapshot.read repository artifact) - .let [version_template (value@ [#///metadata/snapshot.artifact #///artifact.version] snapshot) - artifact_version (value.format [#value.version version_template - #value.snapshot (value@ [#///metadata/snapshot.versioning #///artifact/versioning.snapshot] snapshot)]) - artifact (with@ #///artifact.version artifact_version artifact)] + .let [version_template (value@ [///metadata/snapshot.#artifact ///artifact.#version] snapshot) + artifact_version (value.format [value.#version version_template + value.#snapshot (value@ [///metadata/snapshot.#versioning ///artifact/versioning.#snapshot] snapshot)]) + artifact (with@ ///artifact.#version artifact_version artifact)] [pom_data pom_status] (..hashed repository version_template artifact ///artifact/extension.pom) library_&_status (..hashed repository version_template artifact extension)] (\ async.monad in @@ -144,9 +144,9 @@ [pom (\ utf8.codec decoded pom_data) pom (\ xml.codec decoded pom) profile (<xml>.result ///pom.parser (list pom))] - (in [#///package.origin {#///repository/origin.Remote ""} - #///package.library library_&_status - #///package.pom [pom pom_data pom_status]])))))) + (in [///package.#origin {///repository/origin.#Remote ""} + ///package.#library library_&_status + ///package.#pom [pom pom_data pom_status]])))))) (type: .public Resolution (Dictionary Dependency Package)) @@ -161,8 +161,8 @@ (exception: .public (cannot_resolve [dependency Dependency]) (exception.report - ["Artifact" (%.text (///artifact.format (value@ #//.artifact dependency)))] - ["Type" (%.text (value@ #//.type dependency))])) + ["Artifact" (%.text (///artifact.format (value@ //.#artifact dependency)))] + ["Type" (%.text (value@ //.#type dependency))])) (template [<sigil> <name> <doing> <at>] [(def: (<name> console repository artifact) @@ -182,24 +182,24 @@ (def: .public (any console repositories dependency) (-> (Console Async) (List (Repository Async)) Dependency (Async (Try Package))) (case repositories - #.End + {.#End} (|> dependency (exception.except ..cannot_resolve) (\ async.monad in)) - {#.Item repository alternatives} + {.#Item repository alternatives} (do [! async.monad] - [_ (..announce_fetching console repository (value@ #//.artifact dependency)) + [_ (..announce_fetching console repository (value@ //.#artifact dependency)) outcome (..one repository dependency)] (case outcome - {#try.Success package} + {try.#Success package} (do ! - [_ (..announce_success console repository (value@ #//.artifact dependency))] + [_ (..announce_success console repository (value@ //.#artifact dependency))] (in outcome)) - {#try.Failure error} + {try.#Failure error} (do ! - [_ (..announce_failure console repository (value@ #//.artifact dependency))] + [_ (..announce_failure console repository (value@ //.#artifact dependency))] (any console alternatives dependency)))))) (def: .public (all console repositories new_repository dependencies resolution) @@ -213,12 +213,12 @@ dependencies dependencies resolution resolution] (case dependencies - #.End + {.#End} (\ async.monad in [successes failures resolution]) - {#.Item head tail} - (case (value@ [#//.artifact #///artifact.version] head) + {.#Item head tail} + (case (value@ [//.#artifact ///artifact.#version] head) ... Skip if there is no version "" (recur repositories successes @@ -227,13 +227,13 @@ resolution) _ (do [! async.monad] [?package (case (dictionary.value head resolution) - {#.Some package} - (in {#try.Success package}) + {.#Some package} + (in {try.#Success package}) - #.None + {.#None} (..any console repositories head))] (case ?package - {#try.Success package} + {try.#Success package} (do ! [.let [redundant? (: (Predicate Dependency) (predicate.or (\ //.equivalence = head) @@ -252,15 +252,15 @@ ... sub_repositories (list\composite repositories package_repositories) ]] (recur repositories - {#.Item head successes} + {.#Item head successes} failures (set.list (set.union (set.of_list //.hash tail) (set.of_list //.hash sub_dependencies))) (dictionary.has head package resolution))) - {#try.Failure error} + {try.#Failure error} (recur repositories successes - {#.Item head failures} + {.#Item head failures} tail resolution))))))) diff --git a/stdlib/source/program/aedifex/dependency/status.lux b/stdlib/source/program/aedifex/dependency/status.lux index 150d3120b..0be99a0fe 100644 --- a/stdlib/source/program/aedifex/dependency/status.lux +++ b/stdlib/source/program/aedifex/dependency/status.lux @@ -12,7 +12,7 @@ (type: .public Status (Variant - #Unverified + {#Unverified} {#Partial (Either (Hash SHA-1) (Hash MD5))} {#Verified (Hash SHA-1) (Hash MD5)})) diff --git a/stdlib/source/program/aedifex/format.lux b/stdlib/source/program/aedifex/format.lux index 5f7669366..95b4bf30a 100644 --- a/stdlib/source/program/aedifex/format.lux +++ b/stdlib/source/program/aedifex/format.lux @@ -26,10 +26,10 @@ (`' [#name (~ (code.text name)) #url (~ (code.text url)) #type (~ (case type - #/.Repo + {/.#Repo} (' "repo") - #/.Manual + {/.#Manual} (' "manual")))])) (def: (organization [name url]) @@ -40,11 +40,11 @@ (def: (developer [name url organization]) (Format /.Developer) (case organization - #.None + {.#None} (`' [#name (~ (code.text name)) #url (~ (code.text url))]) - {#.Some value} + {.#Some value} (`' [#name (~ (code.text name)) #url (~ (code.text url)) #organization (~ (..organization value))]))) @@ -72,17 +72,17 @@ (All (_ a) (-> Text (Maybe a) (Format a) Aggregate Aggregate)) (case value - #.None + {.#None} aggregate - {#.Some value} + {.#Some value} (dictionary.has field (format value) aggregate))) (def: (on_list field value format aggregate) (All (_ a) (-> Text (List a) (Format a) Aggregate Aggregate)) (case value - #.End + {.#End} aggregate value @@ -110,13 +110,13 @@ (def: (info value) (Format /.Info) (|> ..empty - (..on_maybe "url" (value@ #/.url value) code.text) - (..on_maybe "scm" (value@ #/.scm value) code.text) - (..on_maybe "description" (value@ #/.description value) code.text) - (..on_list "licenses" (value@ #/.licenses value) ..license) - (..on_maybe "organization" (value@ #/.organization value) ..organization) - (..on_list "developers" (value@ #/.developers value) ..developer) - (..on_list "contributors" (value@ #/.contributors value) ..contributor) + (..on_maybe "url" (value@ /.#url value) code.text) + (..on_maybe "scm" (value@ /.#scm value) code.text) + (..on_maybe "description" (value@ /.#description value) code.text) + (..on_list "licenses" (value@ /.#licenses value) ..license) + (..on_maybe "organization" (value@ /.#organization value) ..organization) + (..on_list "developers" (value@ /.#developers value) ..developer) + (..on_list "contributors" (value@ /.#contributors value) ..contributor) ..aggregate)) (def: (artifact' [group name version]) @@ -144,25 +144,25 @@ (def: (profile value) (Format /.Profile) (`` (|> ..empty - (..on_list "parents" (value@ #/.parents value) code.text) - (..on_maybe "identity" (value@ #/.identity value) ..artifact) - (..on_maybe "info" (value@ #/.info value) ..info) - (..on_set "repositories" (value@ #/.repositories value) code.text) - (..on_set "dependencies" (value@ #/.dependencies value) ..dependency) - (dictionary.has "compiler" (..dependency (value@ #/.compiler value))) - (..on_set "sources" (value@ #/.sources value) code.text) - (dictionary.has "target" (code.text (value@ #/.target value))) - (..on_maybe "program" (value@ #/.program value) code.text) - (..on_maybe "test" (value@ #/.test value) code.text) - (..on_dictionary "deploy_repositories" (value@ #/.deploy_repositories value) code.text code.text) + (..on_list "parents" (value@ /.#parents value) code.text) + (..on_maybe "identity" (value@ /.#identity value) ..artifact) + (..on_maybe "info" (value@ /.#info value) ..info) + (..on_set "repositories" (value@ /.#repositories value) code.text) + (..on_set "dependencies" (value@ /.#dependencies value) ..dependency) + (dictionary.has "compiler" (..dependency (value@ /.#compiler value))) + (..on_set "sources" (value@ /.#sources value) code.text) + (dictionary.has "target" (code.text (value@ /.#target value))) + (..on_maybe "program" (value@ /.#program value) code.text) + (..on_maybe "test" (value@ /.#test value) code.text) + (..on_dictionary "deploy_repositories" (value@ /.#deploy_repositories value) code.text code.text) (~~ (template [<tag>] [(dictionary.has (template.text [<tag>]) (..runtime (value@ <tag> value)))] - [#/.java] - [#/.js] - [#/.python] - [#/.lua] - [#/.ruby])) + [/.#java] + [/.#js] + [/.#python] + [/.#lua] + [/.#ruby])) ..aggregate))) (def: .public project diff --git a/stdlib/source/program/aedifex/hash.lux b/stdlib/source/program/aedifex/hash.lux index 4c2e3cd9f..4cbc77515 100644 --- a/stdlib/source/program/aedifex/hash.lux +++ b/stdlib/source/program/aedifex/hash.lux @@ -99,7 +99,7 @@ [(def: .public (<name> data) (-> Binary (Try (Hash <kind>))) (if (n.= <size> (binary.size data)) - {#try.Success (:abstraction data)} + {try.#Success (:abstraction data)} (exception.except <exception> [data])))] [as_sha-1 SHA-1 ..sha-1::size ..not_a_sha-1] @@ -125,13 +125,13 @@ output (binary.empty hash_size)] (let [index (n.* chunk i64.bytes_per_i64)] (case (text.split_at ..hex_per_chunk input) - {#.Some [head tail]} + {.#Some [head tail]} (do try.monad [head (\ n.hex decoded head) output (binary.write/64! index head output)] (recur tail (++ chunk) output)) - #.None + {.#None} (case (..hash_size input) 0 (constructor output) (^template [<size> <write>] diff --git a/stdlib/source/program/aedifex/input.lux b/stdlib/source/program/aedifex/input.lux index aa76979a8..024c4d0b2 100644 --- a/stdlib/source/program/aedifex/input.lux +++ b/stdlib/source/program/aedifex/input.lux @@ -36,11 +36,11 @@ syntax.no_aliases (text.size source_code))] (case (parse [location.dummy 0 source_code]) - {#.Left [_ error]} - {#try.Failure error} + {.#Left [_ error]} + {try.#Failure error} - {#.Right [_ lux_code]} - {#try.Success lux_code}))) + {.#Right [_ lux_code]} + {try.#Success lux_code}))) (def: project_parser (-> Binary (Try Project)) diff --git a/stdlib/source/program/aedifex/metadata.lux b/stdlib/source/program/aedifex/metadata.lux index d0dbba2ba..83320d752 100644 --- a/stdlib/source/program/aedifex/metadata.lux +++ b/stdlib/source/program/aedifex/metadata.lux @@ -18,16 +18,16 @@ (def: .public (remote_artifact_uri artifact) (-> Artifact URI) (let [/ uri.separator] - (format (//artifact.directory / (value@ #//artifact.group artifact)) - / (value@ #//artifact.name artifact) - / (value@ #//artifact.version artifact) + (format (//artifact.directory / (value@ //artifact.#group artifact)) + / (value@ //artifact.#name artifact) + / (value@ //artifact.#version artifact) / ..remote_file))) (def: .public (remote_project_uri artifact) (-> Artifact URI) (let [/ uri.separator] - (format (//artifact.directory / (value@ #//artifact.group artifact)) - / (value@ #//artifact.name artifact) + (format (//artifact.directory / (value@ //artifact.#group artifact)) + / (value@ //artifact.#name artifact) / ..remote_file))) (def: local_file diff --git a/stdlib/source/program/aedifex/metadata/artifact.lux b/stdlib/source/program/aedifex/metadata/artifact.lux index d0bdf887e..ad0477dcc 100644 --- a/stdlib/source/program/aedifex/metadata/artifact.lux +++ b/stdlib/source/program/aedifex/metadata/artifact.lux @@ -59,10 +59,10 @@ (def: (time_format value) (%.Format Time) - (let [(^slots [#time.hour #time.minute #time.second]) (time.clock value)] - (%.format (..pad hour) - (..pad minute) - (..pad second)))) + (let [(^slots [time.#hour time.#minute time.#second]) (time.clock value)] + (%.format (..pad #hour) + (..pad #minute) + (..pad #second)))) (def: (instant_format value) (%.Format Instant) @@ -84,7 +84,7 @@ (template [<name> <type> <tag> <pre>] [(def: <name> (-> <type> XML) - (|>> <pre> {#xml.Text} list {#xml.Node <tag> xml.attributes}))] + (|>> <pre> {xml.#Text} list {xml.#Node <tag> xml.attributes}))] [group_format Group ..<group> (|>)] [name_format Name ..<name> (|>)] @@ -94,15 +94,15 @@ (def: versions_format (-> (List Version) XML) - (|>> (list\each ..version_format) {#xml.Node ..<versions> xml.attributes})) + (|>> (list\each ..version_format) {xml.#Node ..<versions> xml.attributes})) (def: .public (format value) (-> Metadata XML) - {#xml.Node ..<metadata> + {xml.#Node ..<metadata> xml.attributes (list (..group_format (value@ #group value)) (..name_format (value@ #name value)) - {#xml.Node ..<versioning> + {xml.#Node ..<versioning> xml.attributes (list (..versions_format (value@ #versions value)) (..last_updated_format (value@ #last_updated value)))})}) @@ -129,10 +129,10 @@ minute (<>.codec n.decimal (<text>.exactly 2 <text>.decimal)) second (<>.codec n.decimal (<text>.exactly 2 <text>.decimal))] (<>.lifted (time.time - [#time.hour hour - #time.minute minute - #time.second second - #time.milli_second 0])))) + [time.#hour hour + time.#minute minute + time.#second second + time.#milli_second 0])))) (def: last_updated_parser (Parser Instant) @@ -178,20 +178,20 @@ (do async.monad [project (\ repository download (..uri artifact))] (case project - {#try.Success project} + {try.#Success project} (in (|> project (do> try.monad [(\ utf8.codec decoded)] [(\ xml.codec decoded)] [list (<xml>.result ..parser)]))) - {#try.Failure error} - (in {#try.Success - (let [(^slots [#///artifact.group #///artifact.name]) artifact] - [#group group - #name name - #versions (list) - #last_updated ..epoch])})))) + {try.#Failure error} + (in {try.#Success + (let [(^slots [///artifact.#group ///artifact.#name]) artifact] + [..#group #group + ..#name #name + ..#versions (list) + ..#last_updated ..epoch])})))) (def: .public (write repository artifact metadata) (-> (Repository Async) Artifact Metadata (Async (Try Any))) diff --git a/stdlib/source/program/aedifex/metadata/snapshot.lux b/stdlib/source/program/aedifex/metadata/snapshot.lux index 05a065c6f..c840fc870 100644 --- a/stdlib/source/program/aedifex/metadata/snapshot.lux +++ b/stdlib/source/program/aedifex/metadata/snapshot.lux @@ -62,7 +62,7 @@ (template [<name> <type> <tag> <pre>] [(def: <name> (-> <type> XML) - (|>> <pre> #xml.Text list {#xml.Node <tag> xml.attributes}))] + (|>> <pre> {xml.#Text} list {xml.#Node <tag> xml.attributes}))] [group_format Group ..<group> (|>)] [name_format Name ..<name> (|>)] @@ -71,8 +71,8 @@ (def: .public (format (^slots [#artifact #versioning])) (-> Metadata XML) - (let [(^slots [#///artifact.group #///artifact.name #///artifact.version]) artifact] - {#xml.Node ..<metadata> + (let [(^slots [///artifact.#group ///artifact.#name ///artifact.#version]) artifact] + {xml.#Node ..<metadata> xml.attributes (list (..group_format group) (..name_format name) @@ -91,12 +91,12 @@ [group (<xml>.somewhere (..text ..<group>)) name (<xml>.somewhere (..text ..<name>)) version (<xml>.somewhere (..text ..<version>)) - versioning (with_expansions [<default_version> [#///artifact/snapshot/version.extension ///artifact/type.jvm_library - #///artifact/snapshot/version.value version - #///artifact/snapshot/version.updated ///artifact/time.epoch]] + versioning (with_expansions [<default_version> [///artifact/snapshot/version.#extension ///artifact/type.jvm_library + ///artifact/snapshot/version.#value version + ///artifact/snapshot/version.#updated ///artifact/time.epoch]] (|> (<xml>.somewhere ///artifact/versioning.parser) (\ ! each - (revised@ #///artifact/versioning.versions + (revised@ ///artifact/versioning.#versions (: (-> (List ///artifact/snapshot/version.Version) (List ///artifact/snapshot/version.Version)) (|>> (case> (^ (list)) @@ -104,12 +104,12 @@ versions versions))))) - (<>.else [#///artifact/versioning.snapshot #///artifact/snapshot.Local - #///artifact/versioning.last_updated ///artifact/time.epoch - #///artifact/versioning.versions (list <default_version>)])))] - (in [#artifact [#///artifact.group group - #///artifact.name name - #///artifact.version version] + (<>.else [///artifact/versioning.#snapshot {///artifact/snapshot.#Local} + ///artifact/versioning.#last_updated ///artifact/time.epoch + ///artifact/versioning.#versions (list <default_version>)])))] + (in [#artifact [///artifact.#group group + ///artifact.#name name + ///artifact.#version version] #versioning versioning])))) (def: .public equivalence @@ -128,15 +128,15 @@ (do async.monad [project (\ repository download (..uri artifact))] (case project - {#try.Success project} + {try.#Success project} (in (|> project (do> try.monad [(\ utf8.codec decoded)] [(\ xml.codec decoded)] [list (<xml>.result ..parser)]))) - {#try.Failure error} - (in {#try.Success + {try.#Failure error} + (in {try.#Success [#artifact artifact #versioning ///artifact/versioning.init]})))) diff --git a/stdlib/source/program/aedifex/package.lux b/stdlib/source/program/aedifex/package.lux index 923c69cbc..a80ae368d 100644 --- a/stdlib/source/program/aedifex/package.lux +++ b/stdlib/source/program/aedifex/package.lux @@ -44,20 +44,20 @@ _ false))] - [local? #//origin.Local] - [remote? #//origin.Remote] + [local? //origin.#Local] + [remote? //origin.#Remote] ) (def: .public (local pom library) (-> XML Binary Package) - [#origin {#//origin.Local ""} + [#origin {//origin.#Local ""} #library [library - {#//status.Verified (//hash.sha-1 library) + {//status.#Verified (//hash.sha-1 library) (//hash.md5 library)}] #pom (let [binary_pom (|> pom (\ xml.codec encoded) (\ utf8.codec encoded))] [pom binary_pom - {#//status.Verified (//hash.sha-1 binary_pom) + {//status.#Verified (//hash.sha-1 binary_pom) (//hash.md5 binary_pom)}])]) (def: .public dependencies @@ -66,7 +66,7 @@ product.left list (<xml>.result //pom.parser) - (try\each (value@ #/.dependencies)))) + (try\each (value@ /.#dependencies)))) (def: .public repositories (-> Package (Try (Set Address))) @@ -74,7 +74,7 @@ product.left list (<xml>.result //pom.parser) - (try\each (value@ #/.repositories)))) + (try\each (value@ /.#repositories)))) (def: .public equivalence (Equivalence Package) diff --git a/stdlib/source/program/aedifex/parser.lux b/stdlib/source/program/aedifex/parser.lux index b3239d4e2..b42553a8e 100644 --- a/stdlib/source/program/aedifex/parser.lux +++ b/stdlib/source/program/aedifex/parser.lux @@ -31,10 +31,10 @@ (def: (as_input input) (-> (Maybe Code) (List Code)) (case input - {#.Some input} + {.#Some input} (list input) - #.None + {.#None} (list))) (def: (singular input tag parser) @@ -89,7 +89,7 @@ ($_ <>.and (..singular input "name" ..name) (..singular input "url" ..url) - (<>.else #/.Repo + (<>.else {/.#Repo} (..singular input "type" (<>.or (<code>.this! (' "repo")) (<code>.this! (' "manual")))))))) diff --git a/stdlib/source/program/aedifex/pom.lux b/stdlib/source/program/aedifex/pom.lux index e98730532..932a24207 100644 --- a/stdlib/source/program/aedifex/pom.lux +++ b/stdlib/source/program/aedifex/pom.lux @@ -47,25 +47,25 @@ (def: version XML - {#_.Node ["" "modelVersion"] _.attributes - (list {#_.Text "4.0.0"})}) + {_.#Node ["" "modelVersion"] _.attributes + (list {_.#Text "4.0.0"})}) (def: (property tag value) (-> Text Text XML) - {#_.Node ["" tag] + {_.#Node ["" tag] _.attributes - (list {#_.Text value})}) + (list {_.#Text value})}) (def: (artifact value) (-> Artifact (List XML)) - (list (..property ..group_tag (value@ #//artifact.group value)) - (..property ..artifact_tag (value@ #//artifact.name value)) - (..property ..version_tag (value@ #//artifact.version value)))) + (list (..property ..group_tag (value@ //artifact.#group value)) + (..property ..artifact_tag (value@ //artifact.#name value)) + (..property ..version_tag (value@ //artifact.#version value)))) (def: distribution (-> /.Distribution XML) - (|>> (case> #/.Repo "repo" - #/.Manual "manual") + (|>> (case> {/.#Repo} "repo" + {/.#Manual} "manual") (..property "distribution"))) (def: (license [name url distribution]) @@ -73,37 +73,37 @@ (|> (list (..property "name" name) (..property ..url_tag url) (..distribution distribution)) - {#_.Node ["" "license"] _.attributes})) + {_.#Node ["" "license"] _.attributes})) (def: repository (-> Address XML) (|>> (..property ..url_tag) list - {#_.Node ["" ..repository_tag] _.attributes})) + {_.#Node ["" ..repository_tag] _.attributes})) (def: (dependency value) (-> Dependency XML) - {#_.Node ["" ..dependency_tag] + {_.#Node ["" ..dependency_tag] _.attributes - (list\composite (..artifact (value@ #//dependency.artifact value)) - (list (..property "type" (value@ #//dependency.type value))))}) + (list\composite (..artifact (value@ //dependency.#artifact value)) + (list (..property "type" (value@ //dependency.#type value))))}) (def: (group tag) (-> Text (-> (List XML) XML)) - (|>> {#_.Node ["" tag] _.attributes})) + (|>> {_.#Node ["" tag] _.attributes})) (comment (def: scm (-> /.SCM XML) (|>> (..property ..url_tag) list - {#_.Node ["" "scm"] _.attributes})) + {_.#Node ["" "scm"] _.attributes})) (def: (organization [name url]) (-> /.Organization XML) (|> (list (..property "name" name) (..property ..url_tag url)) - {#_.Node ["" "organization"] _.attributes})) + {_.#Node ["" "organization"] _.attributes})) (def: (developer_organization [name url]) (-> /.Organization (List XML)) @@ -119,7 +119,7 @@ (template [<name> <type> <tag>] [(def: <name> (-> <type> XML) - (|>> ..developer' {#_.Node ["" <tag>] _.attributes}))] + (|>> ..developer' {_.#Node ["" <tag>] _.attributes}))] [developer /.Developer "developer"] [contributor /.Contributor "contributor"] @@ -128,27 +128,27 @@ (def: (info value) (-> /.Info (List XML)) ($_ list\composite - (|> value (value@ #/.url) (maybe\each (..property ..url_tag)) maybe.list) - (|> value (value@ #/.description) (maybe\each (..property "description")) maybe.list) - (|> value (value@ #/.licenses) (list\each ..license) (..group "licenses") list) - (|> value (value@ #/.scm) (maybe\each ..scm) maybe.list) - (|> value (value@ #/.organization) (maybe\each ..organization) maybe.list) - (|> value (value@ #/.developers) (list\each ..developer) (..group "developers") list) - (|> value (value@ #/.contributors) (list\each ..contributor) (..group "contributors") list) + (|> value (value@ /.#url) (maybe\each (..property ..url_tag)) maybe.list) + (|> value (value@ /.#description) (maybe\each (..property "description")) maybe.list) + (|> value (value@ /.#licenses) (list\each ..license) (..group "licenses") list) + (|> value (value@ /.#scm) (maybe\each ..scm) maybe.list) + (|> value (value@ /.#organization) (maybe\each ..organization) maybe.list) + (|> value (value@ /.#developers) (list\each ..developer) (..group "developers") list) + (|> value (value@ /.#contributors) (list\each ..contributor) (..group "contributors") list) )) ) (def: .public (write value) (-> /.Profile (Try XML)) - (case (value@ #/.identity value) - {#.Some identity} - {#try.Success - {#_.Node ["" ..project_tag] _.attributes + (case (value@ /.#identity value) + {.#Some identity} + {try.#Success + {_.#Node ["" ..project_tag] _.attributes ($_ list\composite (list ..version) (..artifact identity) - (|> value (value@ #/.repositories) set.list (list\each ..repository) (..group "repositories") list) - (|> value (value@ #/.dependencies) set.list (list\each ..dependency) (..group ..dependencies_tag) list) + (|> value (value@ /.#repositories) set.list (list\each ..repository) (..group "repositories") list) + (|> value (value@ /.#dependencies) set.list (list\each ..dependency) (..group ..dependencies_tag) list) )}} _ @@ -173,14 +173,14 @@ (do maybe.monad [group (dictionary.value ["" ..group_tag] properties) artifact (dictionary.value ["" ..artifact_tag] properties)] - (in [#//dependency.artifact [#//artifact.group group - #//artifact.name artifact - #//artifact.version (|> properties + (in [//dependency.#artifact [//artifact.#group group + //artifact.#name artifact + //artifact.#version (|> properties (dictionary.value ["" ..version_tag]) (maybe.else "") (text.replaced "${project.version}" own_version) (text.replaced "${project.parent.version}" parent_version))] - #//dependency.type (|> properties + //dependency.#type (|> properties (dictionary.value ["" "type"]) (maybe.else //artifact/type.jvm_library))]))))) @@ -225,7 +225,7 @@ (<>.else (list))) _ (<>.some <xml>.any)] (in (|> (\ /.monoid identity) - (revised@ #/.dependencies (function (_ empty) + (revised@ /.#dependencies (function (_ empty) (list\mix set.has empty dependencies))) - (revised@ #/.repositories (function (_ empty) + (revised@ /.#repositories (function (_ empty) (list\mix set.has empty repositories))))))))) diff --git a/stdlib/source/program/aedifex/profile.lux b/stdlib/source/program/aedifex/profile.lux index 2e3dc3da3..8ef0abbf4 100644 --- a/stdlib/source/program/aedifex/profile.lux +++ b/stdlib/source/program/aedifex/profile.lux @@ -34,13 +34,13 @@ (def: .public default_compiler Dependency - [#dependency.artifact ["com.github.luxlang" "lux-jvm" "0.6.0"] - #dependency.type type.jvm_library]) + [dependency.#artifact ["com.github.luxlang" "lux-jvm" "0.6.0"] + dependency.#type type.jvm_library]) (type: .public Distribution (Variant - #Repo - #Manual)) + {#Repo} + {#Manual})) (implementation: distribution_equivalence (Equivalence Distribution) @@ -48,7 +48,7 @@ (def: (= reference subject) (case [reference subject] (^template [<tag>] - [[<tag> <tag>] + [[{<tag>} {<tag>}] true]) ([#Repo] [#Manual]) @@ -122,11 +122,11 @@ (def: .public default_info Info - [#url #.None - #scm #.None - #description #.None + [#url {.#None} + #scm {.#None} + #description {.#None} #licenses (list) - #organization #.None + #organization {.#None} #developers (list) #contributors (list)]) @@ -215,15 +215,15 @@ (def: identity [#parents (list) - #identity #.None - #info #.None + #identity {.#None} + #info {.#None} #repositories (set.empty text.hash) #dependencies (set.empty dependency.hash) #compiler default_compiler #sources (set.empty text.hash) #target ..default_target - #program #.None - #test #.None + #program {.#None} + #test {.#None} #deploy_repositories (dictionary.empty text.hash) #java runtime.default_java #js runtime.default_js diff --git a/stdlib/source/program/aedifex/project.lux b/stdlib/source/program/aedifex/project.lux index acf3c3819..aedae9c64 100644 --- a/stdlib/source/program/aedifex/project.lux +++ b/stdlib/source/program/aedifex/project.lux @@ -54,22 +54,22 @@ (def: (profile' lineage project name) (-> (Set Name) Project Name (Try Profile)) (case (dictionary.value name project) - {#.Some profile} + {.#Some profile} (case (list.example (set.member? lineage) - (value@ #//.parents profile)) - {#.Some ouroboros} + (value@ //.#parents profile)) + {.#Some ouroboros} (exception.except ..circular_dependency [ouroboros name]) - #.None + {.#None} (do [! try.monad] [parents (monad.each ! (profile' (set.has name lineage) project) - (value@ #//.parents profile))] + (value@ //.#parents profile))] (in (list\mix (function (_ parent child) (\ //.monoid composite child parent)) - (with@ #//.parents (list) profile) + (with@ //.#parents (list) profile) parents)))) - #.None + {.#None} (exception.except ..unknown_profile [name]))) (def: .public profile diff --git a/stdlib/source/program/aedifex/repository.lux b/stdlib/source/program/aedifex/repository.lux index b836cfa54..365195828 100644 --- a/stdlib/source/program/aedifex/repository.lux +++ b/stdlib/source/program/aedifex/repository.lux @@ -57,24 +57,24 @@ (do [! stm.monad] [|state| (stm.read state)] (case (\ mock on_download uri |state|) - {#try.Success [|state| output]} + {try.#Success [|state| output]} (do ! [_ (stm.write |state| state)] - (in {#try.Success output})) + (in {try.#Success output})) - {#try.Failure error} - (in {#try.Failure error}))))) + {try.#Failure error} + (in {try.#Failure error}))))) (def: (upload uri content) (stm.commit! (do [! stm.monad] [|state| (stm.read state)] (case (\ mock on_upload uri content |state|) - {#try.Success |state|} + {try.#Success |state|} (do ! [_ (stm.write |state| state)] - (in {#try.Success []})) + (in {try.#Success []})) - {#try.Failure error} - (in {#try.Failure error}))))) + {try.#Failure error} + (in {try.#Failure error}))))) ))) diff --git a/stdlib/source/program/aedifex/repository/local.lux b/stdlib/source/program/aedifex/repository/local.lux index 508fcba28..e00c5f240 100644 --- a/stdlib/source/program/aedifex/repository/local.lux +++ b/stdlib/source/program/aedifex/repository/local.lux @@ -53,7 +53,7 @@ _ (if ? (in []) (case (file.parent fs absolute_path) - {#.Some parent} + {.#Some parent} (file.make_directories async.monad fs parent) _ diff --git a/stdlib/source/program/aedifex/repository/remote.lux b/stdlib/source/program/aedifex/repository/remote.lux index 269ff15a9..9f09b0993 100644 --- a/stdlib/source/program/aedifex/repository/remote.lux +++ b/stdlib/source/program/aedifex/repository/remote.lux @@ -65,15 +65,15 @@ [[status message] (: (IO (Try (@http.Response IO))) (http.get (format address uri) (http.headers ..base_headers) - #.None + {.#None} http))] (case status (^ (static http/status.ok)) - (\ ! each product.right ((value@ #@http.body message) #.None)) + (\ ! each product.right ((value@ #@http.body message) {.#None})) _ (do ! - [_ ((value@ #@http.body message) {#.Some 0})] + [_ ((value@ #@http.body message) {.#Some 0})] (\ io.monad in (exception.except ..download_failure [(format address uri) status])))))) (def: (upload uri content) @@ -81,15 +81,15 @@ [[status message] (: (IO (Try (@http.Response IO))) (http.put (format address uri) (http.headers (case identity - #.None + {.#None} ..base_headers - {#.Some [user password]} + {.#Some [user password]} (list& ["Authorization" (//identity.basic_auth user password)] ..base_headers))) - {#.Some content} + {.#Some content} http)) - _ ((value@ #@http.body message) {#.Some 0})] + _ ((value@ #@http.body message) {.#Some 0})] (case status (^ (static http/status.created)) (in []) |