From cd71a864ad5be13ed6ec6d046e0a2cb1087bdf94 Mon Sep 17 00:00:00 2001 From: Eduardo Julian Date: Fri, 10 Sep 2021 01:21:23 -0400 Subject: Migrated variants to the new syntax. --- stdlib/source/program/aedifex/command/auto.lux | 4 +- stdlib/source/program/aedifex/command/build.lux | 48 +++++++++++------------ stdlib/source/program/aedifex/command/deploy.lux | 2 +- stdlib/source/program/aedifex/command/deps.lux | 2 +- stdlib/source/program/aedifex/command/install.lux | 4 +- stdlib/source/program/aedifex/command/test.lux | 4 +- 6 files changed, 32 insertions(+), 32 deletions(-) (limited to 'stdlib/source/program/aedifex/command') diff --git a/stdlib/source/program/aedifex/command/auto.lux b/stdlib/source/program/aedifex/command/auto.lux index dc065c399..0b82f4d81 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) @@ -65,7 +65,7 @@ [_ (..pause delay) events (\ watcher poll [])] (case events - (#.Item _) + {#.Item _} (do ! [_ ] (recur [])) diff --git a/stdlib/source/program/aedifex/command/build.lux b/stdlib/source/program/aedifex/command/build.lux index 7d4592179..63d2affb7 100644 --- a/stdlib/source/program/aedifex/command/build.lux +++ b/stdlib/source/program/aedifex/command/build.lux @@ -51,7 +51,7 @@ (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) + {#.Some dependency} #.None))))) (def: .public lux_group @@ -75,11 +75,11 @@ (type: .public Compiler (Variant - (#JVM Dependency) - (#JS Dependency) - (#Python Dependency) - (#Lua Dependency) - (#Ruby Dependency))) + {#JVM Dependency} + {#JS Dependency} + {#Python Dependency} + {#Lua Dependency} + {#Ruby Dependency})) (def: (remove_dependency dependency) (-> Dependency (-> Resolution Resolution)) @@ -91,12 +91,12 @@ (-> 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 [ ] [(^ (static )) - (#try.Success [(..remove_dependency dependency resolution) - ( dependency)])]) + {#try.Success [(..remove_dependency dependency resolution) + { dependency}]}]) ([#JVM ..jvm_compiler_name] [#JS ..js_compiler_name] [#Python ..python_compiler_name] @@ -139,16 +139,16 @@ (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] @@ -166,7 +166,7 @@ (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) @@ -203,18 +203,18 @@ _ (|> (\ process []) (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 [])))) (console.write_line line console))))) @@ -245,7 +245,7 @@ (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) @@ -267,7 +267,7 @@ #.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) @@ -276,14 +276,14 @@ [[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) + {#JVM dependency} [(|> (value@ #///.java profile) (with@ #///runtime.parameters (list "program._")) - (with_jvm_class_path (#.Item (..path fs home dependency) host_dependencies))) + (with_jvm_class_path {#.Item (..path fs home dependency) host_dependencies})) "program.jar"] (^template [ ] - [( dependency) + [{ dependency} [(|> dependency (..path fs home) (///runtime.for (value@ profile))) diff --git a/stdlib/source/program/aedifex/command/deploy.lux b/stdlib/source/program/aedifex/command/deploy.lux index ee2cc3c71..4d18f1b18 100644 --- a/stdlib/source/program/aedifex/command/deploy.lux +++ b/stdlib/source/program/aedifex/command/deploy.lux @@ -71,7 +71,7 @@ (let [pom_data (|> pom (\ xml.codec encoded) (\ utf8.codec encoded))] - [#///package.origin (#///repository/origin.Remote "") + [#///package.origin {#///repository/origin.Remote ""} #///package.library [library (///dependency/status.verified library)] #///package.pom [pom diff --git a/stdlib/source/program/aedifex/command/deps.lux b/stdlib/source/program/aedifex/command/deps.lux index 0cce84d7c..f26a76211 100644 --- a/stdlib/source/program/aedifex/command/deps.lux +++ b/stdlib/source/program/aedifex/command/deps.lux @@ -42,7 +42,7 @@ (do async.monad [.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 660d82477..65575f63f 100644 --- a/stdlib/source/program/aedifex/command/install.lux +++ b/stdlib/source/program/aedifex/command/install.lux @@ -52,7 +52,7 @@ (def: .public (do! console fs repository profile) (-> (Console Async) (file.System Async) (Repository Async) (Command Any)) (case (value@ #/.identity profile) - (#.Some identity) + {#.Some identity} (do ///action.monad [package (|> profile (value@ #/.sources) @@ -66,7 +66,7 @@ (let [pom_data (|> pom (\ xml.codec encoded) (\ utf8.codec encoded))] - [#///package.origin (#///origin.Local "") + [#///package.origin {#///origin.Local ""} #///package.library (let [library (binary.result tar.writer package)] [library (///dependency/status.verified library)]) #///package.pom [pom diff --git a/stdlib/source/program/aedifex/command/test.lux b/stdlib/source/program/aedifex/command/test.lux index 35c805645..3e5cad3c6 100644 --- a/stdlib/source/program/aedifex/command/test.lux +++ b/stdlib/source/program/aedifex/command/test.lux @@ -42,13 +42,13 @@ [_ (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)) (//build.with_jvm_class_path host_dependencies)) (^template [ ] - [( artifact) + [{ artifact} (///runtime.for (value@ profile) program)]) ([#//build.JS #///.js] -- cgit v1.2.3