aboutsummaryrefslogtreecommitdiff
path: root/stdlib/source/program/aedifex/command
diff options
context:
space:
mode:
Diffstat (limited to 'stdlib/source/program/aedifex/command')
-rw-r--r--stdlib/source/program/aedifex/command/auto.lux8
-rw-r--r--stdlib/source/program/aedifex/command/build.lux46
-rw-r--r--stdlib/source/program/aedifex/command/clean.lux6
-rw-r--r--stdlib/source/program/aedifex/command/deploy.lux4
-rw-r--r--stdlib/source/program/aedifex/command/deploy/release.lux20
-rw-r--r--stdlib/source/program/aedifex/command/deploy/snapshot.lux4
-rw-r--r--stdlib/source/program/aedifex/command/deps.lux4
-rw-r--r--stdlib/source/program/aedifex/command/install.lux6
-rw-r--r--stdlib/source/program/aedifex/command/pom.lux4
-rw-r--r--stdlib/source/program/aedifex/command/test.lux8
-rw-r--r--stdlib/source/program/aedifex/command/version.lux2
11 files changed, 56 insertions, 56 deletions
diff --git a/stdlib/source/program/aedifex/command/auto.lux b/stdlib/source/program/aedifex/command/auto.lux
index 2e07625cb..81a1a855a 100644
--- a/stdlib/source/program/aedifex/command/auto.lux
+++ b/stdlib/source/program/aedifex/command/auto.lux
@@ -25,7 +25,7 @@
[dependency
[resolution (.only Resolution)]]]])
-(def: (targets fs path)
+(def (targets fs path)
(-> (file.System Async) file.Path (Async (List file.Path)))
(let [! async.monad]
(|> path
@@ -35,15 +35,15 @@
(at ! conjoint)
(at ! each (|>> list.together (list.partial path))))))
-(def: .public delay
+(def .public delay
Nat
1,000)
-(def: (pause delay)
+(def (pause delay)
(-> Nat (Async (Try Any)))
(async.after delay {try.#Success []}))
-(def: .public (do! delay watcher command)
+(def .public (do! delay watcher command)
(All (_ a)
(-> Nat (Watcher Async)
(-> (Console Async) (Program Async) (file.System Async) (Shell Async) Resolution (Command [Exit a]))
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 [<dependency> <definition>]
- [(def: .public <definition>
+ [(def .public <definition>
Name
<dependency>)]
@@ -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 [<name> <capability>]
- [(def: .public (<name> console process)
+ [(def .public (<name> 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)]
diff --git a/stdlib/source/program/aedifex/command/clean.lux b/stdlib/source/program/aedifex/command/clean.lux
index c16c517d6..de683bce1 100644
--- a/stdlib/source/program/aedifex/command/clean.lux
+++ b/stdlib/source/program/aedifex/command/clean.lux
@@ -18,7 +18,7 @@
["[1]" profile]
["[1][0]" action (.only Action)]])
-(def: (clean_files! fs root)
+(def (clean_files! fs root)
(-> (file.System Async) Path (Async (Try Any)))
(do [! ///action.monad]
[_ (|> root
@@ -27,11 +27,11 @@
(at ! conjoint))]
(in [])))
-(def: .public success
+(def .public success
(-> ///.Target Text)
(|>> (format "Successfully cleaned target directory: ")))
-(def: .public (do! console fs profile)
+(def .public (do! console fs profile)
(-> (Console Async) (file.System Async) (Command Any))
(do [! async.monad]
[.let [target (the ///.#target profile)]
diff --git a/stdlib/source/program/aedifex/command/deploy.lux b/stdlib/source/program/aedifex/command/deploy.lux
index 0f34ba9a3..e432f5dac 100644
--- a/stdlib/source/program/aedifex/command/deploy.lux
+++ b/stdlib/source/program/aedifex/command/deploy.lux
@@ -23,10 +23,10 @@
["/" profile]
["[1][0]" action]]]])
-(def: .public success
+(def .public success
"Successfully deployed the project.")
-(def: .public (do! program shell console local remote fs artifact profile)
+(def .public (do! program shell console local remote fs artifact profile)
(-> (Program Async) (Shell Async) (Console Async) (Repository Async) (Repository Async) (file.System Async) Artifact (Command Any))
(do [! ///action.monad]
[_ (if (/snapshot.snapshot? artifact)
diff --git a/stdlib/source/program/aedifex/command/deploy/release.lux b/stdlib/source/program/aedifex/command/deploy/release.lux
index 667bbf1ee..b709680ad 100644
--- a/stdlib/source/program/aedifex/command/deploy/release.lux
+++ b/stdlib/source/program/aedifex/command/deploy/release.lux
@@ -67,13 +67,13 @@
"[1]::[0]"
("static" getProperty [java/lang/String] "io" "try" java/lang/String))
-(def: windows?
+(def windows?
(IO (Try Bit))
(at (try.with io.monad) each
(|>> java/lang/String::toLowerCase ffi.of_string (text.starts_with? "windows"))
(java/lang/System::getProperty (ffi.as_string "os.name"))))
-(def: dummy_jar
+(def dummy_jar
Binary
(|> (packager.package (context.jvm "")
(dictionary.empty text.hash)
@@ -88,7 +88,7 @@
(undefined))))
(with_template [<name> <extension>]
- [(def: <name>
+ [(def <name>
(-> Text Text)
(text.suffix <extension>))]
@@ -100,7 +100,7 @@
)
(with_template [<name> <suffix>]
- [(def: <name>
+ [(def <name>
(-> Text Text)
(|>> (text.suffix <suffix>) ..jar))]
@@ -108,11 +108,11 @@
[sources "-sources"]
)
-(def: .public release?
+(def .public release?
(Predicate Artifact)
(|>> //snapshot.snapshot? not))
-(def: (install_dummies! program local fs artifact)
+(def (install_dummies! program local fs artifact)
(-> (Program Async) (Repository Async) (file.System Async) Artifact (Async (Try Any)))
(do (try.with async.monad)
[.let [$artifact (////artifact.uri (the ////artifact.#version artifact) artifact)]
@@ -121,18 +121,18 @@
_ (at local upload (..sources $artifact) ..dummy_jar)]
(in [])))
-(def: (signed it)
+(def (signed it)
(-> Text [Text Text])
[it (..asc it)])
-(def: (release_unsigned_artifact! local remote uri)
+(def (release_unsigned_artifact! local remote uri)
(-> (Repository Async) (Repository Async) Text (Async (Try Binary)))
(do [! ////action.monad]
[it (at local download uri)
_ (at remote upload uri it)]
(in it)))
-(def: (release_signed_artifact! local remote [artifact signature])
+(def (release_signed_artifact! local remote [artifact signature])
(-> (Repository Async) (Repository Async) [Text Text] (Async (Try Any)))
(do [! ////action.monad]
[it (..release_unsigned_artifact! local remote artifact)
@@ -144,7 +144,7 @@
_ (..release_unsigned_artifact! local remote signature)]
(in [])))
-(def: .public (do! program shell console local remote fs artifact profile)
+(def .public (do! program shell console local remote fs artifact profile)
(-> (Program Async) (Shell Async) (Console Async) (Repository Async) (Repository Async) (file.System Async) Artifact (Command Any))
(do [! ////action.monad]
[_ (///install.do! console fs local profile)
diff --git a/stdlib/source/program/aedifex/command/deploy/snapshot.lux b/stdlib/source/program/aedifex/command/deploy/snapshot.lux
index 37fc9a19b..dcfdc3ba4 100644
--- a/stdlib/source/program/aedifex/command/deploy/snapshot.lux
+++ b/stdlib/source/program/aedifex/command/deploy/snapshot.lux
@@ -39,12 +39,12 @@
["[1][0]" artifact (.only Artifact)
["[1]/[0]" type]]])
-(def: .public snapshot?
+(def .public snapshot?
(Predicate Artifact)
(|>> (the ////artifact.#version)
(text.contains? "-SNAPSHOT")))
-(def: .public (do! console remote fs artifact profile)
+(def .public (do! console remote fs artifact profile)
(-> (Console Async) (Repository Async) (file.System Async) Artifact (Command Any))
(do [! ////action.monad]
[library (|> profile
diff --git a/stdlib/source/program/aedifex/command/deps.lux b/stdlib/source/program/aedifex/command/deps.lux
index f2bc10fb1..682bec78c 100644
--- a/stdlib/source/program/aedifex/command/deps.lux
+++ b/stdlib/source/program/aedifex/command/deps.lux
@@ -31,13 +31,13 @@
["[1]/[0]" resolution (.only Resolution)]
["[1]/[0]" deployment]]]])
-(def: format
+(def format
(%.Format Dependency)
(|>> (the ///dependency.#artifact)
///artifact.format
%.text))
-(def: .public (do! console local remotes new_repository profile)
+(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 (|> (the ///.#dependencies profile)
diff --git a/stdlib/source/program/aedifex/command/install.lux b/stdlib/source/program/aedifex/command/install.lux
index 9e624a11c..f42a8fd65 100644
--- a/stdlib/source/program/aedifex/command/install.lux
+++ b/stdlib/source/program/aedifex/command/install.lux
@@ -45,13 +45,13 @@
["[1][0]" artifact (.only Artifact)
["[1]/[0]" type]]]])
-(def: .public success
+(def .public success
"Successfully installed the project locally.")
-(def: .public failure
+(def .public failure
"Failure: No 'identity' defined for the project.")
-(def: .public (do! console fs local profile)
+(def .public (do! console fs local profile)
(-> (Console Async) (file.System Async) (Repository Async) (Command Any))
(case (the /.#identity profile)
{.#Some identity}
diff --git a/stdlib/source/program/aedifex/command/pom.lux b/stdlib/source/program/aedifex/command/pom.lux
index 7b12a095b..f156e6f6b 100644
--- a/stdlib/source/program/aedifex/command/pom.lux
+++ b/stdlib/source/program/aedifex/command/pom.lux
@@ -22,10 +22,10 @@
["[1][0]" action]
["[1][0]" pom]])
-(def: .public success
+(def .public success
(format "Successfully created POM file: " ///pom.file))
-(def: .public (do! console fs profile)
+(def .public (do! console fs profile)
(-> (Console Async) (file.System Async) (Command Any))
(do ///action.monad
[content (|> (///pom.write profile)
diff --git a/stdlib/source/program/aedifex/command/test.lux b/stdlib/source/program/aedifex/command/test.lux
index 2e9e69ef8..c4eb94274 100644
--- a/stdlib/source/program/aedifex/command/test.lux
+++ b/stdlib/source/program/aedifex/command/test.lux
@@ -30,11 +30,11 @@
[dependency
[resolution (.only Resolution)]]]])
-(def: .public start "[TEST STARTED]")
-(def: .public success "[TEST ENDED]")
-(def: .public failure "[TEST FAILED]")
+(def .public start "[TEST STARTED]")
+(def .public success "[TEST ENDED]")
+(def .public failure "[TEST FAILED]")
-(def: .public (do! console program fs shell resolution profile)
+(def .public (do! console program fs shell resolution profile)
(-> (Console Async) (Program Async) (file.System Async) (Shell Async) Resolution (Command [Exit Any]))
(do async.monad
[environment (program.environment async.monad program)
diff --git a/stdlib/source/program/aedifex/command/version.lux b/stdlib/source/program/aedifex/command/version.lux
index 506c1d93f..68293c94c 100644
--- a/stdlib/source/program/aedifex/command/version.lux
+++ b/stdlib/source/program/aedifex/command/version.lux
@@ -15,7 +15,7 @@
[///
[command (.only Command)]])
-(def: .public (do! console profile)
+(def .public (do! console profile)
(-> (Console Async) (Command Any))
(is (Async (Try Any))
(console.write_line (version.format meta/version.latest)