diff options
Diffstat (limited to 'stdlib/source/program/aedifex/command')
-rw-r--r-- | stdlib/source/program/aedifex/command/auto.lux | 4 | ||||
-rw-r--r-- | stdlib/source/program/aedifex/command/build.lux | 60 | ||||
-rw-r--r-- | stdlib/source/program/aedifex/command/clean.lux | 8 | ||||
-rw-r--r-- | stdlib/source/program/aedifex/command/deploy.lux | 38 | ||||
-rw-r--r-- | stdlib/source/program/aedifex/command/deps.lux | 8 | ||||
-rw-r--r-- | stdlib/source/program/aedifex/command/install.lux | 18 | ||||
-rw-r--r-- | stdlib/source/program/aedifex/command/pom.lux | 6 | ||||
-rw-r--r-- | stdlib/source/program/aedifex/command/test.lux | 8 | ||||
-rw-r--r-- | stdlib/source/program/aedifex/command/version.lux | 2 |
9 files changed, 76 insertions, 76 deletions
diff --git a/stdlib/source/program/aedifex/command/auto.lux b/stdlib/source/program/aedifex/command/auto.lux index 4b151861b..afce4d6ff 100644 --- a/stdlib/source/program/aedifex/command/auto.lux +++ b/stdlib/source/program/aedifex/command/auto.lux @@ -53,11 +53,11 @@ (-> (Console Promise) (Program Promise) (file.System Promise) (Shell Promise) Resolution (Command Any)))) (function (_ console program fs shell resolution) (function (_ profile) - (with-expansions [<call> ((command console program fs shell resolution) profile)] + (with_expansions [<call> ((command console program fs shell resolution) profile)] (do {! promise.monad} [targets (|> profile (get@ #///.sources) - set.to-list + set.to_list (monad.map ! (..targets fs)) (\ ! map list.concat))] (do {! ///action.monad} diff --git a/stdlib/source/program/aedifex/command/build.lux b/stdlib/source/program/aedifex/command/build.lux index de8ceb991..cb4465edd 100644 --- a/stdlib/source/program/aedifex/command/build.lux +++ b/stdlib/source/program/aedifex/command/build.lux @@ -42,7 +42,7 @@ (type: Finder (-> Resolution (Maybe Dependency))) -(def: (dependency-finder group name) +(def: (dependency_finder group name) (-> Group Name Finder) (|>> dictionary.entries (list.one (function (_ [dependency package]) @@ -51,60 +51,60 @@ (#.Some dependency) #.None))))) -(def: #export lux-group +(def: #export lux_group Group "com.github.luxlang") -(def: #export jvm-compiler-name +(def: #export jvm_compiler_name Name "lux-jvm") -(def: #export js-compiler-name +(def: #export js_compiler_name Name "lux-js") (template [<finder> <name>] [(def: <finder> Finder - (..dependency-finder ..lux-group <name>))] + (..dependency_finder ..lux_group <name>))] - [jvm-compiler ..jvm-compiler-name] - [js-compiler ..js-compiler-name] + [jvm_compiler ..jvm_compiler_name] + [js_compiler ..js_compiler_name] ) -(exception: #export no-available-compiler) -(exception: #export no-specified-program) -(exception: #export no-specified-target) +(exception: #export no_available_compiler) +(exception: #export no_specified_program) +(exception: #export no_specified_target) (type: #export Compiler (#JVM Artifact) (#JS Artifact)) -(def: (remove-dependency dependency) +(def: (remove_dependency dependency) (-> Dependency (-> Resolution Resolution)) (|>> dictionary.entries (list.filter (|>> product.left (is? dependency) not)) - (dictionary.from-list ///dependency.hash))) + (dictionary.from_list ///dependency.hash))) (def: (compiler resolution) (-> Resolution (Try [Resolution Compiler])) - (case [(..jvm-compiler resolution) - (..js-compiler resolution)] + (case [(..jvm_compiler resolution) + (..js_compiler resolution)] [(#.Some dependency) _] - (#try.Success [(..remove-dependency dependency resolution) + (#try.Success [(..remove_dependency dependency resolution) (#JVM (get@ #///dependency.artifact dependency))]) [_ (#.Some dependency)] - (#try.Success [(..remove-dependency dependency resolution) + (#try.Success [(..remove_dependency dependency resolution) (#JS (get@ #///dependency.artifact dependency))]) _ - (exception.throw ..no-available-compiler []))) + (exception.throw ..no_available_compiler []))) (def: (libraries fs home) (All [!] (-> (file.System !) Path Resolution (List Path))) (|>> dictionary.keys - (list.filter (|>> (get@ #///dependency.type) (text\= ///artifact/type.lux-library))) + (list.filter (|>> (get@ #///dependency.type) (text\= ///artifact/type.lux_library))) (list\map (|>> (get@ #///dependency.artifact) (///local.path fs home))))) (def: (singular name) @@ -124,16 +124,16 @@ (case [(get@ #///.program profile) (get@ #///.target profile)] [#.None _] - (promise\wrap (exception.throw ..no-specified-program [])) + (promise\wrap (exception.throw ..no_specified_program [])) [_ #.None] - (promise\wrap (exception.throw ..no-specified-target [])) + (promise\wrap (exception.throw ..no_specified_target [])) - [(#.Some program-module) (#.Some target)] + [(#.Some program_module) (#.Some target)] (do promise.monad [environment (\ program environment []) home (\ program home []) - working-directory (\ program directory [])] + working_directory (\ program directory [])] (do ///action.monad [[resolution compiler] (promise\wrap (..compiler resolution)) #let [[command output] (let [[compiler output] (case compiler @@ -143,20 +143,20 @@ "program.js"])] [(format compiler " build") output]) / (\ fs separator) - cache-directory (format working-directory / target)] - _ (console.write-line ..start console) + cache_directory (format working_directory / target)] + _ (console.write_line ..start console) process (!.use (\ shell execute) [environment - working-directory + working_directory command (list.concat (list (..plural "--library" (..libraries fs home resolution)) - (..plural "--source" (set.to-list (get@ #///.sources profile))) - (..singular "--target" cache-directory) - (..singular "--module" program-module)))]) + (..plural "--source" (set.to_list (get@ #///.sources profile))) + (..singular "--target" cache_directory) + (..singular "--module" program_module)))]) exit (!.use (\ process await) []) - _ (console.write-line (if (i.= shell.normal exit) + _ (console.write_line (if (i.= shell.normal exit) ..success ..failure) console)] (wrap [compiler - (format cache-directory / output)]))))) + (format cache_directory / output)]))))) diff --git a/stdlib/source/program/aedifex/command/clean.lux b/stdlib/source/program/aedifex/command/clean.lux index 7f942fc00..900de2cc4 100644 --- a/stdlib/source/program/aedifex/command/clean.lux +++ b/stdlib/source/program/aedifex/command/clean.lux @@ -16,7 +16,7 @@ ["#" profile] ["#." action (#+ Action)]]) -(def: (clean-files! root) +(def: (clean_files! root) (-> (Directory Promise) (Promise (Try Any))) (do {! ///action.monad} [nodes (: (Promise (Try (List (File Promise)))) @@ -41,12 +41,12 @@ (!.use (\ fs directory) target)) _ (loop [root target] (do ! - [_ (..clean-files! root) + [_ (..clean_files! root) subs (: (Promise (Try (List (Directory Promise)))) (!.use (\ root directories) [])) _ (monad.map ! recur subs)] (!.use (\ root discard) [])))] - (console.write-line ..success console)) + (console.write_line ..success console)) #.None - (console.write-line ..failure console))) + (console.write_line ..failure console))) diff --git a/stdlib/source/program/aedifex/command/deploy.lux b/stdlib/source/program/aedifex/command/deploy.lux index 5763c1ff5..1f84567f0 100644 --- a/stdlib/source/program/aedifex/command/deploy.lux +++ b/stdlib/source/program/aedifex/command/deploy.lux @@ -47,7 +47,7 @@ (def: epoch Instant - (instant.from-millis +0)) + (instant.from_millis +0)) (template [<name> <type> <uri> <parser> <default>] [(def: (<name> repository artifact) @@ -65,37 +65,37 @@ (#try.Failure error) (wrap (#try.Success <default>)))))] - [read-project-metadata ///metadata/artifact.Metadata ///metadata.project ///metadata/artifact.parser + [read_project_metadata ///metadata/artifact.Metadata ///metadata.project ///metadata/artifact.parser (let [(^slots [#///artifact.group #///artifact.name #///artifact.version]) artifact] {#///metadata/artifact.group group #///metadata/artifact.name name #///metadata/artifact.versions (list) - #///metadata/artifact.last-updated ..epoch})] - [read-version-metadata ///metadata/snapshot.Metadata ///metadata.version ///metadata/snapshot.parser + #///metadata/artifact.last_updated ..epoch})] + [read_version_metadata ///metadata/snapshot.Metadata ///metadata.version ///metadata/snapshot.parser (let [(^slots [#///artifact.group #///artifact.name #///artifact.version]) artifact] {#///metadata/snapshot.group group #///metadata/snapshot.name name #///metadata/snapshot.version version - #///metadata/snapshot.versioning {#///metadata/snapshot.time-stamp ..epoch + #///metadata/snapshot.versioning {#///metadata/snapshot.time_stamp ..epoch #///metadata/snapshot.build 0 #///metadata/snapshot.snapshot (list)}})] ) -(def: snapshot-artifacts +(def: snapshot_artifacts (List ///artifact/type.Type) (list ///artifact/type.pom (format ///artifact/type.pom ///artifact/extension.sha-1) (format ///artifact/type.pom ///artifact/extension.md5) - ///artifact/type.lux-library - (format ///artifact/type.lux-library ///artifact/extension.sha-1) - (format ///artifact/type.lux-library ///artifact/extension.md5))) + ///artifact/type.lux_library + (format ///artifact/type.lux_library ///artifact/extension.sha-1) + (format ///artifact/type.lux_library ///artifact/extension.md5))) (def: #export (do! console repository fs artifact profile) (-> (Console Promise) (Repository Promise) (file.System Promise) Artifact (Command Any)) (let [deploy! (: (-> Extension Binary (Action Any)) (|>> (///repository.uri artifact) (\ repository upload))) - fully-deploy! (: (-> Extension Binary (Action Any)) + fully_deploy! (: (-> Extension Binary (Action Any)) (function (_ extension payload) (do ///action.monad [_ (deploy! extension payload) @@ -108,31 +108,31 @@ (do promise.monad [now (promise.future instant.now)] (do {! ///action.monad} - [project (..read-project-metadata repository artifact) - snapshot (..read-version-metadata repository artifact) + [project (..read_project_metadata repository artifact) + snapshot (..read_version_metadata repository artifact) pom (\ ! map (|>> (\ xml.codec encode) (\ encoding.utf8 encode)) (promise\wrap (///pom.write profile))) library (|> profile (get@ #/.sources) - set.to-list + set.to_list (export.library fs) (\ ! map (binary.run tar.writer))) - _ (fully-deploy! ///artifact/extension.pom pom) - _ (fully-deploy! ///artifact/extension.lux-library library) + _ (fully_deploy! ///artifact/extension.pom pom) + _ (fully_deploy! ///artifact/extension.lux_library library) _ (|> snapshot - (set@ [#///metadata/snapshot.versioning #///metadata/snapshot.time-stamp] now) + (set@ [#///metadata/snapshot.versioning #///metadata/snapshot.time_stamp] now) (update@ [#///metadata/snapshot.versioning #///metadata/snapshot.build] inc) - (set@ [#///metadata/snapshot.versioning #///metadata/snapshot.snapshot] ..snapshot-artifacts) + (set@ [#///metadata/snapshot.versioning #///metadata/snapshot.snapshot] ..snapshot_artifacts) ///metadata/snapshot.write (\ xml.codec encode) (\ encoding.utf8 encode) (\ repository upload (///metadata.version artifact))) _ (|> project (set@ #///metadata/artifact.versions (list version)) - (set@ #///metadata/artifact.last-updated now) + (set@ #///metadata/artifact.last_updated now) ///metadata/artifact.write (\ xml.codec encode) (\ encoding.utf8 encode) (\ repository upload (///metadata.project artifact)))] - (console.write-line //clean.success console))))) + (console.write_line //clean.success console))))) diff --git a/stdlib/source/program/aedifex/command/deps.lux b/stdlib/source/program/aedifex/command/deps.lux index dbb277948..315c6375c 100644 --- a/stdlib/source/program/aedifex/command/deps.lux +++ b/stdlib/source/program/aedifex/command/deps.lux @@ -27,9 +27,9 @@ (def: #export (do! program console fs repositories profile) (-> (Program Promise) (Console Promise) (file.System Promise) (List (Repository Promise)) (Command Resolution)) (do ///action.monad - [#let [dependencies (set.to-list (get@ #///.dependencies profile))] - cache (///cache.read-all program fs dependencies ///dependency/resolution.empty) + [#let [dependencies (set.to_list (get@ #///.dependencies profile))] + cache (///cache.read_all program fs dependencies ///dependency/resolution.empty) resolution (///dependency/resolution.all repositories dependencies cache) - cached (///cache.write-all program fs resolution) - _ (console.write-line //clean.success console)] + cached (///cache.write_all program fs resolution) + _ (console.write_line //clean.success console)] (wrap resolution))) diff --git a/stdlib/source/program/aedifex/command/install.lux b/stdlib/source/program/aedifex/command/install.lux index 67dc242ac..033b41b40 100644 --- a/stdlib/source/program/aedifex/command/install.lux +++ b/stdlib/source/program/aedifex/command/install.lux @@ -42,8 +42,8 @@ (-> (file.System Promise) Binary Path (Promise (Try Any))) (do (try.with promise.monad) [file (: (Promise (Try (File Promise))) - (file.get-file promise.monad system file))] - (!.use (\ file over-write) [content]))) + (file.get_file promise.monad system file))] + (!.use (\ file over_write) [content]))) (def: #export failure "Failure: No 'identity' defined for the project.") @@ -55,16 +55,16 @@ (do promise.monad [home (\ program home [])] (do ///action.monad - [package (export.library system (set.to-list (get@ #/.sources profile))) + [package (export.library system (set.to_list (get@ #/.sources profile))) repository (: (Promise (Try Path)) - (file.make-directories promise.monad system (///local.path system home identity))) - #let [artifact-name (format repository (\ system separator) (///artifact.identity identity))] + (file.make_directories promise.monad system (///local.path system home identity))) + #let [artifact_name (format repository (\ system separator) (///artifact.identity identity))] _ (..save! system (binary.run tar.writer package) - (format artifact-name ///artifact/extension.lux-library)) + (format artifact_name ///artifact/extension.lux_library)) pom (\ promise.monad wrap (///pom.write profile)) _ (..save! system (|> pom (\ xml.codec encode) (\ encoding.utf8 encode)) - (format artifact-name ///artifact/extension.pom))] - (console.write-line //clean.success console))) + (format artifact_name ///artifact/extension.pom))] + (console.write_line //clean.success console))) _ - (console.write-line ..failure console))) + (console.write_line ..failure console))) diff --git a/stdlib/source/program/aedifex/command/pom.lux b/stdlib/source/program/aedifex/command/pom.lux index 618c6b4b9..390d7d7d2 100644 --- a/stdlib/source/program/aedifex/command/pom.lux +++ b/stdlib/source/program/aedifex/command/pom.lux @@ -29,10 +29,10 @@ (do ///action.monad [pom (promise\wrap (///pom.write profile)) file (: (Promise (Try (File Promise))) - (file.get-file promise.monad fs ///pom.file)) + (file.get_file promise.monad fs ///pom.file)) outcome (|> pom (\ xml.codec encode) (\ encoding.utf8 encode) - (!.use (\ file over-write))) - _ (console.write-line //clean.success console)] + (!.use (\ file over_write))) + _ (console.write_line //clean.success console)] (wrap ///pom.file))) diff --git a/stdlib/source/program/aedifex/command/test.lux b/stdlib/source/program/aedifex/command/test.lux index 089417b94..2727fc461 100644 --- a/stdlib/source/program/aedifex/command/test.lux +++ b/stdlib/source/program/aedifex/command/test.lux @@ -34,19 +34,19 @@ (-> (Console Promise) (Program Promise) (file.System Promise) (Shell Promise) Resolution (Command Any)) (do promise.monad [environment (\ program environment []) - working-directory (\ program directory [])] + working_directory (\ program directory [])] (do ///action.monad [[compiler program] (//build.do! console program fs shell resolution profile) - _ (console.write-line ..start console) + _ (console.write_line ..start console) process (!.use (\ shell execute) [environment - working-directory + working_directory (case compiler (#//build.JVM artifact) (///runtime.java program) (#//build.JS artifact) (///runtime.node program)) (list)]) exit (!.use (\ process await) []) - _ (console.write-line (if (i.= shell.normal exit) + _ (console.write_line (if (i.= shell.normal exit) ..success ..failure) console)] diff --git a/stdlib/source/program/aedifex/command/version.lux b/stdlib/source/program/aedifex/command/version.lux index 076d2a71d..be40d54eb 100644 --- a/stdlib/source/program/aedifex/command/version.lux +++ b/stdlib/source/program/aedifex/command/version.lux @@ -16,5 +16,5 @@ (def: #export (do! console profile) (-> (Console Promise) (Command Any)) - (console.write-line (version.format language/lux.version) + (console.write_line (version.format language/lux.version) console)) |