From 34e310622bdeb1d0588c0664c0e78cbaa84f837c Mon Sep 17 00:00:00 2001 From: Eduardo Julian Date: Wed, 2 Dec 2020 06:42:20 -0400 Subject: Re-named "::" and ":::" macros to "\" and "\\", to be consistent with the convention that only macros that deal with types may start with a colon. --- stdlib/source/program/aedifex/artifact.lux | 4 +- stdlib/source/program/aedifex/cache.lux | 44 +++++++-------- stdlib/source/program/aedifex/cli.lux | 4 +- stdlib/source/program/aedifex/command/auto.lux | 16 +++--- stdlib/source/program/aedifex/command/build.lux | 6 +-- stdlib/source/program/aedifex/command/clean.lux | 12 ++--- stdlib/source/program/aedifex/command/deploy.lux | 6 +-- stdlib/source/program/aedifex/command/install.lux | 10 ++-- stdlib/source/program/aedifex/command/pom.lux | 4 +- stdlib/source/program/aedifex/command/test.lux | 4 +- stdlib/source/program/aedifex/dependency.lux | 2 +- .../program/aedifex/dependency/resolution.lux | 46 ++++++++-------- stdlib/source/program/aedifex/hash.lux | 12 ++--- stdlib/source/program/aedifex/input.lux | 14 ++--- stdlib/source/program/aedifex/local.lux | 4 +- stdlib/source/program/aedifex/package.lux | 2 +- stdlib/source/program/aedifex/parser.lux | 62 +++++++++++----------- stdlib/source/program/aedifex/pom.lux | 6 +-- stdlib/source/program/aedifex/project.lux | 4 +- stdlib/source/program/aedifex/repository.lux | 20 +++---- 20 files changed, 141 insertions(+), 141 deletions(-) (limited to 'stdlib/source/program/aedifex') diff --git a/stdlib/source/program/aedifex/artifact.lux b/stdlib/source/program/aedifex/artifact.lux index 3160ef356..a26e70e50 100644 --- a/stdlib/source/program/aedifex/artifact.lux +++ b/stdlib/source/program/aedifex/artifact.lux @@ -37,7 +37,7 @@ (def: #export equivalence (Equivalence Artifact) - (:: ..hash &equivalence)) + (\ ..hash &equivalence)) (template [ ] [(def: @@ -81,7 +81,7 @@ (def: #export (path system) (All [!] (-> (file.System !) Artifact Path)) - (..address (:: system separator))) + (..address (\ system separator))) (def: #export (local artifact) (-> Artifact (List Text)) diff --git a/stdlib/source/program/aedifex/cache.lux b/stdlib/source/program/aedifex/cache.lux index 1aee65405..31403b839 100644 --- a/stdlib/source/program/aedifex/cache.lux +++ b/stdlib/source/program/aedifex/cache.lux @@ -37,14 +37,14 @@ (do (try.with promise.monad) [file (: (Promise (Try (File Promise))) (file.get-file promise.monad system file))] - (!.use (:: file over-write) [content]))) + (!.use (\ file over-write) [content]))) (def: #export (write-one system [artifact type] package) (-> (file.System Promise) Dependency Package (Promise (Try Artifact))) (do (try.with promise.monad) [directory (: (Promise (Try Path)) (file.make-directories promise.monad system (//.path system artifact))) - #let [prefix (format directory (:: system separator) (//artifact.identity artifact))] + #let [prefix (format directory (\ system separator) (//artifact.identity artifact))] directory (: (Promise (Try (Directory Promise))) (file.get-directory promise.monad system directory)) _ (..write! system @@ -53,17 +53,17 @@ _ (..write! system (|> package (get@ #//package.sha-1) - (:: //hash.sha-1-codec encode) + (\ //hash.sha-1-codec encode) encoding.to-utf8) (format prefix //artifact/extension.sha-1)) _ (..write! system (|> package (get@ #//package.md5) - (:: //hash.md5-codec encode) + (\ //hash.md5-codec encode) encoding.to-utf8) (format prefix //artifact/extension.md5)) _ (..write! system - (|> package (get@ #//package.pom) (:: xml.codec encode) encoding.to-utf8) + (|> package (get@ #//package.pom) (\ xml.codec encode) encoding.to-utf8) (format prefix //artifact/extension.pom))] (wrap artifact))) @@ -75,49 +75,49 @@ (list.filter (|>> product.right //package.local? not)) (monad.map ! (function (_ [dependency package]) (..write-one system dependency package))) - (:: ! map (set.from-list //artifact.hash))))) + (\ ! map (set.from-list //artifact.hash))))) (def: (read! system path) (-> (file.System Promise) Path (Promise (Try Binary))) (do (try.with promise.monad) [file (: (Promise (Try (File Promise))) - (!.use (:: system file) path))] - (!.use (:: file content) []))) + (!.use (\ system file) path))] + (!.use (\ file content) []))) (def: (decode codec data) (All [a] (-> (Codec Text a) Binary (Try a))) (let [(^open "_\.") try.monad] (|> data encoding.from-utf8 - (_\map (:: codec decode)) + (_\map (\ codec decode)) _\join))) (def: #export (read-one system [artifact type]) (-> (file.System Promise) Dependency (Promise (Try Package))) (let [prefix (format (//.path system artifact) - (:: system separator) + (\ system separator) (//artifact.identity artifact))] (do (try.with promise.monad) [pom (..read! system (format prefix //artifact/extension.pom)) library (..read! system (format prefix (//artifact/extension.extension type))) sha-1 (..read! system (format prefix //artifact/extension.sha-1)) md5 (..read! system (format prefix //artifact/extension.md5))] - (:: promise.monad wrap - (do try.monad - [pom (..decode xml.codec pom) - sha-1 (..decode //hash.sha-1-codec sha-1) - md5 (..decode //hash.md5-codec md5)] - (wrap {#//package.origin #//package.Local - #//package.library library - #//package.pom pom - #//package.sha-1 sha-1 - #//package.md5 md5})))))) + (\ promise.monad wrap + (do try.monad + [pom (..decode xml.codec pom) + sha-1 (..decode //hash.sha-1-codec sha-1) + md5 (..decode //hash.md5-codec md5)] + (wrap {#//package.origin #//package.Local + #//package.library library + #//package.pom pom + #//package.sha-1 sha-1 + #//package.md5 md5})))))) (def: #export (read-all system dependencies resolution) (-> (file.System Promise) (List Dependency) Resolution (Promise (Try Resolution))) (case dependencies #.Nil - (:: (try.with promise.monad) wrap resolution) + (\ (try.with promise.monad) wrap resolution) (#.Cons head tail) (do promise.monad @@ -133,7 +133,7 @@ (do (try.with promise.monad) [sub-dependencies (|> package //package.dependencies - (:: promise.monad wrap)) + (\ promise.monad wrap)) resolution (|> resolution (dictionary.put head package) (read-all system (set.to-list sub-dependencies)))] diff --git a/stdlib/source/program/aedifex/cli.lux b/stdlib/source/program/aedifex/cli.lux index adf52a18b..d52bf4df6 100644 --- a/stdlib/source/program/aedifex/cli.lux +++ b/stdlib/source/program/aedifex/cli.lux @@ -84,6 +84,6 @@ ($_ <>.and cli.any ..command')) - (:: <>.monad map (|>> [/.default]) - ..command') + (\ <>.monad map (|>> [/.default]) + ..command') )) diff --git a/stdlib/source/program/aedifex/command/auto.lux b/stdlib/source/program/aedifex/command/auto.lux index f7ec7a315..c2df31df5 100644 --- a/stdlib/source/program/aedifex/command/auto.lux +++ b/stdlib/source/program/aedifex/command/auto.lux @@ -28,15 +28,15 @@ (def: (targets fs path) (-> (file.System Promise) Path (Promise (List Path))) (do {! promise.monad} - [?root (!.use (:: fs directory) [path])] + [?root (!.use (\ fs directory) [path])] (case ?root (#try.Success root) (loop [root root] (do ! - [subs (:: ! map (|>> (try.default (list))) - (!.use (:: root directories) []))] - (:: ! map (|>> list.concat (list& (!.use (:: root scope) []))) - (monad.map ! recur subs)))) + [subs (\ ! map (|>> (try.default (list))) + (!.use (\ root directories) []))] + (\ ! map (|>> list.concat (list& (!.use (\ root scope) []))) + (monad.map ! recur subs)))) (#try.Failure error) (wrap (list))))) @@ -58,14 +58,14 @@ (get@ #///.sources) set.to-list (monad.map ! (..targets fs)) - (:: ! map list.concat))] + (\ ! map list.concat))] (do {! ///action.monad} - [_ (monad.map ! (:: watcher start watch.all) targets) + [_ (monad.map ! (\ watcher start watch.all) targets) _ ] (loop [_ []] (do ! [_ (..pause []) - events (:: watcher poll []) + events (\ watcher poll []) _ (case events (#.Cons _) (do ! diff --git a/stdlib/source/program/aedifex/command/build.lux b/stdlib/source/program/aedifex/command/build.lux index 30206095e..85210fd36 100644 --- a/stdlib/source/program/aedifex/command/build.lux +++ b/stdlib/source/program/aedifex/command/build.lux @@ -138,10 +138,10 @@ (#JS artifact) [(///runtime.node (///local.path fs artifact)) "program.js"])] [(format compiler " build") output]) - / (:: fs separator) + / (\ fs separator) cache-directory (format working-directory / target)] #let [_ (log! "[BUILD STARTED]")] - process (!.use (:: shell execute) + process (!.use (\ shell execute) [environment working-directory command @@ -149,7 +149,7 @@ (..plural "--source" (set.to-list (get@ #///.sources profile))) (..singular "--target" cache-directory) (..singular "--module" program)))]) - exit (!.use (:: process await) []) + exit (!.use (\ process await) []) #let [_ (log! (if (i.= shell.normal exit) "[BUILD ENDED]" "[BUILD FAILED]"))]] diff --git a/stdlib/source/program/aedifex/command/clean.lux b/stdlib/source/program/aedifex/command/clean.lux index f4f5e1f9e..618125a89 100644 --- a/stdlib/source/program/aedifex/command/clean.lux +++ b/stdlib/source/program/aedifex/command/clean.lux @@ -19,9 +19,9 @@ (-> (Directory Promise) (Promise (Try Any))) (do {! ///action.monad} [nodes (: (Promise (Try (List (File Promise)))) - (!.use (:: root files) [])) + (!.use (\ root files) [])) _ (monad.map ! (function (_ node) - (!.use (:: node delete) [])) + (!.use (\ node delete) [])) nodes)] (wrap []))) @@ -31,17 +31,17 @@ (#.Some target) (do {! ///action.monad} [target (: (Promise (Try (Directory Promise))) - (!.use (:: fs directory) target)) + (!.use (\ fs directory) target)) _ (loop [root target] (do ! [_ (..clean-files! root) subs (: (Promise (Try (List (Directory Promise)))) - (!.use (:: root directories) [])) + (!.use (\ root directories) [])) _ (monad.map ! recur subs)] - (!.use (:: root discard) [])))] + (!.use (\ root discard) [])))] (exec (log! "No 'target' defined for clean-up.") (wrap []))) #.None (exec (log! "No 'target' defined for clean-up.") - (:: ///action.monad wrap [])))) + (\ ///action.monad wrap [])))) diff --git a/stdlib/source/program/aedifex/command/deploy.lux b/stdlib/source/program/aedifex/command/deploy.lux index 839bc7906..1f5ccc441 100644 --- a/stdlib/source/program/aedifex/command/deploy.lux +++ b/stdlib/source/program/aedifex/command/deploy.lux @@ -33,15 +33,15 @@ (def: #export (do! repository fs identity artifact profile) (-> (Repository Promise) (file.System Promise) Identity Artifact (Command Any)) (let [deploy! (: (-> Extension Binary (Action Any)) - (:: repository upload identity artifact))] + (\ repository upload identity artifact))] (do {! ///action.monad} [library (|> profile (get@ #/.sources) set.to-list (export.library fs) - (:: ! map (binary.run tar.writer))) + (\ ! map (binary.run tar.writer))) pom (promise\wrap (///pom.write profile)) - _ (deploy! ///artifact/extension.pom (|> pom (:: xml.codec encode) encoding.to-utf8)) + _ (deploy! ///artifact/extension.pom (|> pom (\ xml.codec encode) encoding.to-utf8)) _ (deploy! ///artifact/extension.lux-library library) _ (deploy! ///artifact/extension.sha-1 (///hash.data (///hash.sha-1 library))) _ (deploy! ///artifact/extension.md5 (///hash.data (///hash.md5 library))) diff --git a/stdlib/source/program/aedifex/command/install.lux b/stdlib/source/program/aedifex/command/install.lux index 818283cc5..b152bc66c 100644 --- a/stdlib/source/program/aedifex/command/install.lux +++ b/stdlib/source/program/aedifex/command/install.lux @@ -39,7 +39,7 @@ (do (try.with promise.monad) [file (: (Promise (Try (File Promise))) (file.get-file promise.monad system file))] - (!.use (:: file over-write) [content]))) + (!.use (\ file over-write) [content]))) (def: #export (do! system profile) (-> (file.System Promise) (Command Any)) @@ -49,14 +49,14 @@ [package (export.library system (set.to-list (get@ #/.sources profile))) repository (: (Promise (Try Path)) (file.make-directories promise.monad system (///local.path system identity))) - #let [artifact-name (format repository (:: system separator) (///artifact.identity 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)) - pom (:: promise.monad wrap (///pom.write profile)) - _ (..save! system (|> pom (:: xml.codec encode) encoding.to-utf8) + pom (\ promise.monad wrap (///pom.write profile)) + _ (..save! system (|> pom (\ xml.codec encode) encoding.to-utf8) (format artifact-name ///artifact/extension.pom)) #let [_ (log! "Successfully installed locally!")]] (wrap [])) _ - (:: promise.monad wrap (exception.throw /.no-identity [])))) + (\ promise.monad wrap (exception.throw /.no-identity [])))) diff --git a/stdlib/source/program/aedifex/command/pom.lux b/stdlib/source/program/aedifex/command/pom.lux index 695a7839f..28bd23921 100644 --- a/stdlib/source/program/aedifex/command/pom.lux +++ b/stdlib/source/program/aedifex/command/pom.lux @@ -28,8 +28,8 @@ file (: (Promise (Try (File Promise))) (file.get-file promise.monad fs ///pom.file)) outcome (|> pom - (:: xml.codec encode) + (\ xml.codec encode) encoding.to-utf8 - (!.use (:: file over-write))) + (!.use (\ file over-write))) #let [_ (log! "Successfully wrote POM file!")]] (wrap ///pom.file))) diff --git a/stdlib/source/program/aedifex/command/test.lux b/stdlib/source/program/aedifex/command/test.lux index f4da76ac4..5c205b7b8 100644 --- a/stdlib/source/program/aedifex/command/test.lux +++ b/stdlib/source/program/aedifex/command/test.lux @@ -31,14 +31,14 @@ [[compiler program] (//build.do! environment fs shell resolution profile) working-directory (promise\wrap (//build.working-directory environment)) #let [_ (log! "[TEST STARTED]")] - process (!.use (:: shell execute) + process (!.use (\ shell execute) [environment working-directory (case compiler (#//build.JVM artifact) (///runtime.java program) (#//build.JS artifact) (///runtime.node program)) (list)]) - exit (!.use (:: process await) []) + exit (!.use (\ process await) []) #let [_ (log! (if (i.= shell.normal exit) "[TEST ENDED]" "[TEST FAILED]"))]] diff --git a/stdlib/source/program/aedifex/dependency.lux b/stdlib/source/program/aedifex/dependency.lux index db997ef3b..595891924 100644 --- a/stdlib/source/program/aedifex/dependency.lux +++ b/stdlib/source/program/aedifex/dependency.lux @@ -23,4 +23,4 @@ (def: #export equivalence (Equivalence Dependency) - (:: hash &equivalence)) + (\ hash &equivalence)) diff --git a/stdlib/source/program/aedifex/dependency/resolution.lux b/stdlib/source/program/aedifex/dependency/resolution.lux index f5dbb0d54..d21adaf0c 100644 --- a/stdlib/source/program/aedifex/dependency/resolution.lux +++ b/stdlib/source/program/aedifex/dependency/resolution.lux @@ -58,38 +58,38 @@ (Exception [Dependency Text]) (Promise (Try (///hash.Hash h))))) (do (try.with promise.monad) - [actual (:: repository download artifact extension)] - (:: promise.monad wrap - (do try.monad - [output (encoding.from-utf8 actual) - actual (:: codec decode output) - _ (exception.assert exception [dependency output] - (:: ///hash.equivalence = (hash library) actual))] - (wrap actual))))) + [actual (\ repository download artifact extension)] + (\ promise.monad wrap + (do try.monad + [output (encoding.from-utf8 actual) + actual (\ codec decode output) + _ (exception.assert exception [dependency output] + (\ ///hash.equivalence = (hash library) actual))] + (wrap actual))))) (def: #export (one repository dependency) (-> (Repository Promise) Dependency (Promise (Try Package))) (let [[artifact type] dependency extension (///artifact/extension.extension type)] (do (try.with promise.monad) - [library (:: repository download artifact extension) + [library (\ repository download artifact extension) sha-1 (..verified-hash dependency library repository artifact ///artifact/extension.sha-1 ///hash.sha-1 ///hash.sha-1-codec ..sha-1-does-not-match) md5 (..verified-hash dependency library repository artifact ///artifact/extension.md5 ///hash.md5 ///hash.md5-codec ..md5-does-not-match) - pom (:: repository download artifact ///artifact/extension.pom)] - (:: promise.monad wrap - (do try.monad - [pom (encoding.from-utf8 pom) - pom (:: xml.codec decode pom) - profile (.run ///pom.parser pom)] - (wrap {#///package.origin #///package.Remote - #///package.library library - #///package.pom pom - #///package.sha-1 sha-1 - #///package.md5 md5})))))) + pom (\ repository download artifact ///artifact/extension.pom)] + (\ promise.monad wrap + (do try.monad + [pom (encoding.from-utf8 pom) + pom (\ xml.codec decode pom) + profile (.run ///pom.parser pom)] + (wrap {#///package.origin #///package.Remote + #///package.library library + #///package.pom pom + #///package.sha-1 sha-1 + #///package.md5 md5})))))) (type: #export Resolution (Dictionary Dependency Package)) @@ -113,7 +113,7 @@ #.Nil (|> dependency (exception.throw ..cannot-resolve) - (:: promise.monad wrap)) + (\ promise.monad wrap)) (#.Cons repository alternatives) (do promise.monad @@ -129,7 +129,7 @@ (-> (List (Repository Promise)) (List Dependency) Resolution (Promise (Try Resolution))) (case dependencies #.Nil - (:: (try.with promise.monad) wrap resolution) + (\ (try.with promise.monad) wrap resolution) (#.Cons head tail) (do (try.with promise.monad) @@ -139,7 +139,7 @@ #.None (..any repositories head)) - sub-dependencies (:: promise.monad wrap (///package.dependencies package)) + sub-dependencies (\ promise.monad wrap (///package.dependencies package)) resolution (|> resolution (dictionary.put head package) (all repositories (set.to-list sub-dependencies)))] diff --git a/stdlib/source/program/aedifex/hash.lux b/stdlib/source/program/aedifex/hash.lux index a484b9a0d..74d965f8c 100644 --- a/stdlib/source/program/aedifex/hash.lux +++ b/stdlib/source/program/aedifex/hash.lux @@ -53,7 +53,7 @@ (def: encode (Format Binary) (binary.fold (function (_ byte representation) - (let [hex (:: n.hex encode byte) + (let [hex (\ n.hex encode byte) hex (case (text.size hex) 1 (format "0" hex) _ hex)] @@ -124,7 +124,7 @@ (case (text.split ..hex-per-chunk input) (#.Some [head tail]) (do try.monad - [head (:: n.hex decode head) + [head (\ n.hex decode head) output (binary.write/64 index head output)] (recur tail (inc chunk) output)) @@ -134,7 +134,7 @@ (^template [ ] [ (do try.monad - [head (:: n.hex decode input) + [head (\ n.hex decode input) output ( index head output)] (constructor output))]) ([1 binary.write/8] @@ -158,7 +158,7 @@ (All [h] (Equivalence (Hash h))) (def: (= reference subject) - (:: binary.equivalence = - (:representation reference) - (:representation subject)))) + (\ binary.equivalence = + (:representation reference) + (:representation subject)))) ) diff --git a/stdlib/source/program/aedifex/input.lux b/stdlib/source/program/aedifex/input.lux index ffed02d28..e2bc72154 100644 --- a/stdlib/source/program/aedifex/input.lux +++ b/stdlib/source/program/aedifex/input.lux @@ -50,10 +50,10 @@ (def: #export (read monad fs profile) (All [!] (-> (Monad !) (file.System !) Text (! (Try Profile)))) (do (try.with monad) - [project-file (!.use (:: fs file) //project.file) - project-file (!.use (:: project-file content) [])] - (:: monad wrap - (|> project-file - (do> try.monad - [..parse-project] - [(//project.profile profile)]))))) + [project-file (!.use (\ fs file) //project.file) + project-file (!.use (\ project-file content) [])] + (\ monad wrap + (|> project-file + (do> try.monad + [..parse-project] + [(//project.profile profile)]))))) diff --git a/stdlib/source/program/aedifex/local.lux b/stdlib/source/program/aedifex/local.lux index 17ddeb4cf..34547027d 100644 --- a/stdlib/source/program/aedifex/local.lux +++ b/stdlib/source/program/aedifex/local.lux @@ -10,11 +10,11 @@ (def: #export (repository system) (All [a] (-> (file.System a) Path)) - (let [/ (:: system separator)] + (let [/ (\ system separator)] (format "~" / ".m2" / "repository"))) (def: #export (path system artifact) (All [a] (-> (file.System a) Artifact Path)) (format (..repository system) - (:: system separator) + (\ system separator) (//artifact.path system artifact))) diff --git a/stdlib/source/program/aedifex/package.lux b/stdlib/source/program/aedifex/package.lux index ae9e98a54..16c7c443b 100644 --- a/stdlib/source/program/aedifex/package.lux +++ b/stdlib/source/program/aedifex/package.lux @@ -44,7 +44,7 @@ (template [ ] [(def: #export (-> Package Bit) - (|>> (get@ #origin) (:: ..origin-equivalence = )))] + (|>> (get@ #origin) (\ ..origin-equivalence = )))] [local? #Local] [remote? #Remote] diff --git a/stdlib/source/program/aedifex/parser.lux b/stdlib/source/program/aedifex/parser.lux index 45e1e6a6a..9fdc00f3b 100644 --- a/stdlib/source/program/aedifex/parser.lux +++ b/stdlib/source/program/aedifex/parser.lux @@ -79,10 +79,10 @@ (def: license (Parser /.License) (do {! <>.monad} - [input (:: ! map - (dictionary.from-list text.hash) - (.record (<>.some (<>.and .local-tag - .any))))] + [input (\ ! map + (dictionary.from-list text.hash) + (.record (<>.some (<>.and .local-tag + .any))))] ($_ <>.and (..singular input "name" ..name) (..singular input "url" ..url) @@ -94,10 +94,10 @@ (def: organization (Parser /.Organization) (do {! <>.monad} - [input (:: ! map - (dictionary.from-list text.hash) - (.record (<>.some (<>.and .local-tag - .any))))] + [input (\ ! map + (dictionary.from-list text.hash) + (.record (<>.some (<>.and .local-tag + .any))))] ($_ <>.and (..singular input "name" ..name) (..singular input "url" ..url)))) @@ -105,10 +105,10 @@ (def: developer (Parser /.Developer) (do {! <>.monad} - [input (:: ! map - (dictionary.from-list text.hash) - (.record (<>.some (<>.and .local-tag - .any))))] + [input (\ ! map + (dictionary.from-list text.hash) + (.record (<>.some (<>.and .local-tag + .any))))] ($_ <>.and (..singular input "name" ..name) (..singular input "url" ..url) @@ -122,10 +122,10 @@ (def: info (Parser /.Info) (do {! <>.monad} - [input (:: ! map - (dictionary.from-list text.hash) - (.record (<>.some (<>.and .local-tag - .any))))] + [input (\ ! map + (dictionary.from-list text.hash) + (.record (<>.some (<>.and .local-tag + .any))))] ($_ <>.and (<>.maybe (..singular input "url" ..url)) (<>.maybe (..singular input "scm" ..scm)) @@ -173,10 +173,10 @@ (def: profile (Parser /.Profile) (do {! <>.monad} - [input (:: ! map - (dictionary.from-list text.hash) - (.record (<>.some (<>.and .local-tag - .any)))) + [input (\ ! map + (dictionary.from-list text.hash) + (.record (<>.some (<>.and .local-tag + .any)))) #let [^parents (: (Parser (List /.Name)) (<>.default (list) (..plural input "parents" .text))) @@ -188,15 +188,15 @@ (..singular input "info" ..info))) ^repositories (: (Parser (Set //repository.Address)) (|> (..plural input "repositories" ..repository) - (:: ! map (set.from-list text.hash)) + (\ ! map (set.from-list text.hash)) (<>.default (set.new text.hash)))) ^dependencies (: (Parser (Set //dependency.Dependency)) (|> (..plural input "dependencies" ..dependency) - (:: ! map (set.from-list //dependency.hash)) + (\ ! map (set.from-list //dependency.hash)) (<>.default (set.new //dependency.hash)))) ^sources (: (Parser (Set /.Source)) (|> (..plural input "sources" ..source) - (:: ! map (set.from-list text.hash)) + (\ ! map (set.from-list text.hash)) (<>.default (set.from-list text.hash (list /.default-source))))) ^target (: (Parser (Maybe /.Target)) (<>.maybe @@ -208,7 +208,7 @@ (<>.maybe (..singular input "test" ..module))) ^deploy-repositories (: (Parser (Dictionary Text //repository.Address)) - (<| (:: ! map (dictionary.from-list text.hash)) + (<| (\ ! map (dictionary.from-list text.hash)) (<>.default (list)) (..singular input "deploy-repositories" ..deploy-repository)))]] ($_ <>.and @@ -227,13 +227,13 @@ (def: #export project (Parser Project) (let [default-profile (: (Parser Project) - (:: <>.monad map - (|>> [/.default] (list) (dictionary.from-list text.hash)) - ..profile)) + (\ <>.monad map + (|>> [/.default] (list) (dictionary.from-list text.hash)) + ..profile)) multi-profile (: (Parser Project) - (:: <>.monad map - (dictionary.from-list text.hash) - (.record (<>.many (<>.and .text - ..profile)))))] + (\ <>.monad map + (dictionary.from-list text.hash) + (.record (<>.many (<>.and .text + ..profile)))))] (<>.either multi-profile default-profile))) diff --git a/stdlib/source/program/aedifex/pom.lux b/stdlib/source/program/aedifex/pom.lux index f8fd5f4f3..c7d950092 100644 --- a/stdlib/source/program/aedifex/pom.lux +++ b/stdlib/source/program/aedifex/pom.lux @@ -152,8 +152,8 @@ (def: parse-dependency (Parser Dependency) (do {! <>.monad} - [properties (:: ! map (dictionary.from-list name.hash) - (.children (<>.some ..parse-property)))] + [properties (\ ! map (dictionary.from-list name.hash) + (.children (<>.some ..parse-property)))] (<| <>.lift try.from-maybe (do maybe.monad @@ -181,6 +181,6 @@ (do ! [dependencies (.somewhere ..parse-dependencies) _ (<>.some .ignore)] - (wrap (|> (:: /.monoid identity) + (wrap (|> (\ /.monoid identity) (update@ #/.dependencies (function (_ empty) (list\fold set.add empty dependencies))))))))) diff --git a/stdlib/source/program/aedifex/project.lux b/stdlib/source/program/aedifex/project.lux index c2946b482..bd191fffb 100644 --- a/stdlib/source/program/aedifex/project.lux +++ b/stdlib/source/program/aedifex/project.lux @@ -38,7 +38,7 @@ (dictionary.new text.hash)) (def: compose - (dictionary.merge-with (:: //.monoid compose)))) + (dictionary.merge-with (\ //.monoid compose)))) (exception: #export (unknown-profile {name Name}) (exception.report @@ -63,7 +63,7 @@ [parents (monad.map ! (profile' (set.add name lineage) project) (get@ #//.parents profile))] (wrap (list\fold (function (_ parent child) - (:: //.monoid compose child parent)) + (\ //.monoid compose child parent)) (set@ #//.parents (list) profile) parents)))) diff --git a/stdlib/source/program/aedifex/repository.lux b/stdlib/source/program/aedifex/repository.lux index e5dc55d2c..7ec522a10 100644 --- a/stdlib/source/program/aedifex/repository.lux +++ b/stdlib/source/program/aedifex/repository.lux @@ -47,10 +47,10 @@ (-> (Repository IO) (Repository Promise)) (structure (def: (download artifact extension) - (promise.future (:: repository download artifact extension))) + (promise.future (\ repository download artifact extension))) (def: (upload identity artifact extension content) - (promise.future (:: repository upload identity artifact extension content))) + (promise.future (\ repository upload identity artifact extension content))) )) (signature: #export (Simulation s) @@ -69,7 +69,7 @@ (stm.commit (do {! stm.monad} [|state| (stm.read state)] - (case (:: simulation on-download artifact extension |state|) + (case (\ simulation on-download artifact extension |state|) (#try.Success [|state| output]) (do ! [_ (stm.write |state| state)] @@ -82,7 +82,7 @@ (stm.commit (do {! stm.monad} [|state| (stm.read state)] - (case (:: simulation on-upload identity artifact extension content |state|) + (case (\ simulation on-upload identity artifact extension content |state|) (#try.Success |state|) (do ! [_ (stm.write |state| state)] @@ -159,9 +159,9 @@ (do {! (try.with io.monad)} [input (|> (java/net/URL::new url) java/net/URL::openStream - (:: ! map (|>> java/io/BufferedInputStream::new))) + (\ ! map (|>> java/io/BufferedInputStream::new))) #let [buffer (binary.create ..buffer-size)]] - (loop [output (:: binary.monoid identity)] + (loop [output (\ binary.monoid identity)] (do ! [bytes-read (java/io/BufferedInputStream::read buffer +0 (.int ..buffer-size) input)] (case bytes-read @@ -169,10 +169,10 @@ [_ (java/lang/AutoCloseable::close input)] (wrap output)) _ (if (n.= ..buffer-size bytes-read) - (recur (:: binary.monoid compose output buffer)) + (recur (\ binary.monoid compose output buffer)) (do ! - [chunk (:: io.monad wrap (binary.slice 0 (.nat bytes-read) buffer))] - (recur (:: binary.monoid compose output chunk)))))))))) + [chunk (\ io.monad wrap (binary.slice 0 (.nat bytes-read) buffer))] + (recur (\ binary.monoid compose output chunk)))))))))) (def: (upload [user password] artifact extension content) (do (try.with io.monad) @@ -190,5 +190,5 @@ code (java/net/HttpURLConnection::getResponseCode connection)] (case code +200 (wrap []) - _ (:: io.monad wrap (exception.throw ..deployment-failure [code]))))) + _ (\ io.monad wrap (exception.throw ..deployment-failure [code]))))) ) -- cgit v1.2.3