From 9e2f1e76f2c8df01ed7687d934c3210fcf676bd6 Mon Sep 17 00:00:00 2001 From: Eduardo Julian Date: Thu, 16 Jun 2022 00:48:19 -0400 Subject: De-sigil-ification: suffix : [Part 13] --- stdlib/source/program/aedifex/command/build.lux | 46 ++++++++++++------------- 1 file changed, 23 insertions(+), 23 deletions(-) (limited to 'stdlib/source/program/aedifex/command/build.lux') diff --git a/stdlib/source/program/aedifex/command/build.lux b/stdlib/source/program/aedifex/command/build.lux index 168aa1971..d183b975b 100644 --- a/stdlib/source/program/aedifex/command/build.lux +++ b/stdlib/source/program/aedifex/command/build.lux @@ -56,7 +56,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]) @@ -65,12 +65,12 @@ {.#Some dependency} {.#None}))))) -(def: .public lux_group +(def .public lux_group Group "com.github.luxlang") (with_template [ ] - [(def: .public + [(def .public Name )] @@ -92,13 +92,13 @@ {#Lua Dependency} {#Ruby Dependency})) -(def: (remove_dependency dependency) +(def (remove_dependency dependency) (-> Dependency (-> Resolution Resolution)) (|>> dictionary.entries (list.only (|>> product.left (same? dependency) not)) (dictionary.of_list ///dependency.hash))) -(def: (lux resolution lux_dependency) +(def (lux resolution lux_dependency) (-> Resolution Dependency (Try [Resolution Lux])) (let [[[lux_group lux_name lux_version] lux_type] lux_dependency] (case (..dependency_finder lux_group lux_name resolution) @@ -120,7 +120,7 @@ _ (exception.except ..no_available_lux [])))) -(def: (path fs home dependency) +(def (path fs home dependency) (All (_ !) (-> (file.System !) Path Dependency Path)) (let [/ (at fs separator) artifact (the ///dependency.#artifact dependency)] @@ -130,23 +130,23 @@ (format home /) (text.suffix (format "." (the ///dependency.#type dependency)))))) -(def: (libraries fs home) +(def (libraries fs home) (All (_ !) (-> (file.System !) Path Resolution (List Path))) (|>> dictionary.keys (list.only (|>> (the ///dependency.#type) (text#= ///artifact/type.lux_library))) (list#each (..path fs home)))) -(def: version_separator +(def version_separator ".") -(def: version_order +(def version_order (Order Version) (implementation - (def: equivalence + (def equivalence text.equivalence) - (def: (< left right) + (def (< left right) (loop (again [left (text.all_split_by ..version_separator left) right (text.all_split_by ..version_separator right)]) (case [left right] @@ -165,7 +165,7 @@ [{.#End} {.#End}] false))))) -(def: .public (host_dependencies fs home) +(def .public (host_dependencies fs home) (All (_ !) (-> (file.System !) Path Resolution (List Path))) (|>> dictionary.keys (list.only (|>> (the ///dependency.#type) @@ -189,20 +189,20 @@ dictionary.values (list#each (|>> product.right (..path fs home))))) -(def: (singular name) +(def (singular name) (-> Text Text (List Text)) (|>> (list name))) -(def: (plural name) +(def (plural name) (-> Text (List Text) (List Text)) (|>> (list#each (|>> (list name))) list.together)) -(def: .public start "[BUILD STARTED]") -(def: .public success "[BUILD ENDED]") -(def: .public failure "[BUILD FAILED]") +(def .public start "[BUILD STARTED]") +(def .public success "[BUILD ENDED]") +(def .public failure "[BUILD FAILED]") (with_template [ ] - [(def: .public ( console process) + [(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)) @@ -243,7 +243,7 @@ "[1]::[0]" ("static" getProperty [java/lang/String] "io" "try" java/lang/String)) -(def: windows? +(def windows? Bit (|> (java/lang/System::getProperty (ffi.as_string "os.name")) io.run! @@ -252,18 +252,18 @@ text.lower_cased (text.starts_with? "windows"))) -(def: jvm_class_path_separator +(def jvm_class_path_separator (if windows? ";" ":")) -(def: (jvm_class_path host_dependencies) +(def (jvm_class_path host_dependencies) (-> (List Path) Text) (|> host_dependencies {.#Item "."} (text.interposed ..jvm_class_path_separator))) -(def: .public (with_jvm_class_path host_dependencies runtime) +(def .public (with_jvm_class_path host_dependencies runtime) (-> (List Path) ///runtime.Runtime ///runtime.Runtime) (case host_dependencies {.#End} @@ -276,7 +276,7 @@ "--add-opens" "java.base/java.lang=ALL-UNNAMED")) runtime))) -(def: .public (do! console program fs shell resolution) +(def .public (do! console program fs shell resolution) (-> (Console Async) (Program Async) (file.System Async) (Shell Async) Resolution (Command [Exit Lux Path])) (function (_ profile) (let [target (the ///.#target profile)] -- cgit v1.2.3