aboutsummaryrefslogtreecommitdiff
path: root/stdlib/source/program/aedifex/command/build.lux
diff options
context:
space:
mode:
authorEduardo Julian2020-12-25 09:22:38 -0400
committerEduardo Julian2020-12-25 09:22:38 -0400
commit4ca397765805eda5ddee393901ed3a02001a960a (patch)
tree2ab184a1a4e244f3a69e86c8a7bb3ad49c22b4a3 /stdlib/source/program/aedifex/command/build.lux
parentd29e091e98dabb8dfcf816899ada480ecbf7e357 (diff)
Replaced kebab-case with snake_case for naming convention.
Diffstat (limited to 'stdlib/source/program/aedifex/command/build.lux')
-rw-r--r--stdlib/source/program/aedifex/command/build.lux60
1 files changed, 30 insertions, 30 deletions
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)])))))