aboutsummaryrefslogtreecommitdiff
path: root/stdlib/source/program
diff options
context:
space:
mode:
authorEduardo Julian2021-08-24 05:23:45 -0400
committerEduardo Julian2021-08-24 05:23:45 -0400
commit36303d6cb2ce3ab9e36d045b9516c997bd461862 (patch)
treeb9d2f1495143054d61d9af129f36833624db9dac /stdlib/source/program
parentec1f31b5a1492d5e0ab260397291d4449483bbd9 (diff)
Outsourced the syntax for labelled type definitions to macros.
Diffstat (limited to 'stdlib/source/program')
-rw-r--r--stdlib/source/program/aedifex.lux4
-rw-r--r--stdlib/source/program/aedifex/artifact.lux10
-rw-r--r--stdlib/source/program/aedifex/artifact/versioning.lux2
-rw-r--r--stdlib/source/program/aedifex/cli.lux2
-rw-r--r--stdlib/source/program/aedifex/command/auto.lux14
-rw-r--r--stdlib/source/program/aedifex/command/build.lux6
-rw-r--r--stdlib/source/program/aedifex/command/clean.lux8
-rw-r--r--stdlib/source/program/aedifex/command/deploy.lux2
-rw-r--r--stdlib/source/program/aedifex/command/pom.lux4
-rw-r--r--stdlib/source/program/aedifex/dependency/deployment.lux10
-rw-r--r--stdlib/source/program/aedifex/dependency/resolution.lux16
-rw-r--r--stdlib/source/program/aedifex/format.lux16
-rw-r--r--stdlib/source/program/aedifex/input.lux8
-rw-r--r--stdlib/source/program/aedifex/metadata/artifact.lux2
-rw-r--r--stdlib/source/program/aedifex/metadata/snapshot.lux2
-rw-r--r--stdlib/source/program/aedifex/package.lux4
-rw-r--r--stdlib/source/program/aedifex/parser.lux24
-rw-r--r--stdlib/source/program/aedifex/pom.lux32
-rw-r--r--stdlib/source/program/aedifex/profile.lux12
-rw-r--r--stdlib/source/program/aedifex/project.lux10
-rw-r--r--stdlib/source/program/aedifex/repository/remote.lux2
-rw-r--r--stdlib/source/program/aedifex/runtime.lux2
-rw-r--r--stdlib/source/program/compositor.lux2
-rw-r--r--stdlib/source/program/compositor/export.lux34
-rw-r--r--stdlib/source/program/compositor/import.lux36
-rw-r--r--stdlib/source/program/scriptum.lux156
26 files changed, 210 insertions, 210 deletions
diff --git a/stdlib/source/program/aedifex.lux b/stdlib/source/program/aedifex.lux
index 4dd110551..0637d36b8 100644
--- a/stdlib/source/program/aedifex.lux
+++ b/stdlib/source/program/aedifex.lux
@@ -68,7 +68,7 @@
(-> /.Profile (List (Repository Async)))
(|>> (value@ #/.repositories)
set.list
- (list\map (|>> (/repository/remote.repository http.default #.None) /repository.async))))
+ (list\each (|>> (/repository/remote.repository http.default #.None) /repository.async))))
(def: (with_dependencies program console command profile)
(All [a]
@@ -127,7 +127,7 @@
(program: [[profile operation] /cli.command]
(do {! io.monad}
[?console console.default]
- (case (try\map console.async ?console)
+ (case (try\each console.async ?console)
(#try.Failure error)
(..fail! error)
diff --git a/stdlib/source/program/aedifex/artifact.lux b/stdlib/source/program/aedifex/artifact.lux
index 6fd2d495f..8aca29ea0 100644
--- a/stdlib/source/program/aedifex/artifact.lux
+++ b/stdlib/source/program/aedifex/artifact.lux
@@ -101,8 +101,8 @@
(def: .public (local artifact)
(-> Artifact (List Text))
- (list\compose (|> artifact
- (value@ #group)
- (text.all_split_by ..group_separator))
- (list (value@ #name artifact)
- (value@ #version artifact))))
+ (list\composite (|> artifact
+ (value@ #group)
+ (text.all_split_by ..group_separator))
+ (list (value@ #name artifact)
+ (value@ #version artifact))))
diff --git a/stdlib/source/program/aedifex/artifact/versioning.lux b/stdlib/source/program/aedifex/artifact/versioning.lux
index 9f9963731..886e89491 100644
--- a/stdlib/source/program/aedifex/artifact/versioning.lux
+++ b/stdlib/source/program/aedifex/artifact/versioning.lux
@@ -66,7 +66,7 @@
(list (//snapshot.format snapshot)
(..last_updated_format last_updated)
(|> versions
- (list\map //snapshot/version.format)
+ (list\each //snapshot/version.format)
(#xml.Node ..<snapshot_versions> xml.attributes)))))
(def: (text tag)
diff --git a/stdlib/source/program/aedifex/cli.lux b/stdlib/source/program/aedifex/cli.lux
index 7f9fe61ff..87ad9938a 100644
--- a/stdlib/source/program/aedifex/cli.lux
+++ b/stdlib/source/program/aedifex/cli.lux
@@ -92,6 +92,6 @@
($_ <>.and
cli.any
..command'))
- (\ <>.monad map (|>> [/.default])
+ (\ <>.monad each (|>> [/.default])
..command')
))
diff --git a/stdlib/source/program/aedifex/command/auto.lux b/stdlib/source/program/aedifex/command/auto.lux
index 0a1998730..77a0c8714 100644
--- a/stdlib/source/program/aedifex/command/auto.lux
+++ b/stdlib/source/program/aedifex/command/auto.lux
@@ -30,10 +30,10 @@
(let [! async.monad]
(|> path
(\ fs sub_directories)
- (\ ! map (|>> (try.else (list))
- (monad.map ! (targets fs))))
- (\ ! join)
- (\ ! map (|>> list.together (list& path))))))
+ (\ ! each (|>> (try.else (list))
+ (monad.each ! (targets fs))))
+ (\ ! conjoint)
+ (\ ! each (|>> list.together (list& path))))))
(def: .public delay
Nat
@@ -55,10 +55,10 @@
[targets (|> profile
(value@ #///.sources)
set.list
- (monad.map ! (..targets fs))
- (\ ! map list.together))]
+ (monad.each ! (..targets fs))
+ (\ ! each list.together))]
(do {! ///action.monad}
- [_ (monad.map ! (\ watcher start watch.modification) targets)
+ [_ (monad.each ! (\ watcher start watch.modification) targets)
_ <call>]
(loop [_ []]
(do !
diff --git a/stdlib/source/program/aedifex/command/build.lux b/stdlib/source/program/aedifex/command/build.lux
index d3c5b17a0..bf7c95870 100644
--- a/stdlib/source/program/aedifex/command/build.lux
+++ b/stdlib/source/program/aedifex/command/build.lux
@@ -123,7 +123,7 @@
(|>> dictionary.keys
(list.only (|>> (value@ #///dependency.type)
(text\= ///artifact/type.lux_library)))
- (list\map (..path fs home))))
+ (list\each (..path fs home))))
(def: version_separator
".")
@@ -175,7 +175,7 @@
(: (Dictionary [Group Name] [Version Dependency])
(dictionary.empty (product.hash text.hash text.hash))))
dictionary.values
- (list\map (|>> product.right (..path fs home)))))
+ (list\each (|>> product.right (..path fs home)))))
(def: (singular name)
(-> Text Text (List Text))
@@ -183,7 +183,7 @@
(def: (plural name)
(-> Text (List Text) (List Text))
- (|>> (list\map (|>> (list name))) list.together))
+ (|>> (list\each (|>> (list name))) list.together))
(def: .public start "[BUILD STARTED]")
(def: .public success "[BUILD ENDED]")
diff --git a/stdlib/source/program/aedifex/command/clean.lux b/stdlib/source/program/aedifex/command/clean.lux
index 9e55ccc83..5ff16928f 100644
--- a/stdlib/source/program/aedifex/command/clean.lux
+++ b/stdlib/source/program/aedifex/command/clean.lux
@@ -23,8 +23,8 @@
(let [! ///action.monad]
(|> root
(\ fs directory_files)
- (\ ! map (monad.map ! (\ fs delete)))
- (\ ! join))))
+ (\ ! each (monad.each ! (\ fs delete)))
+ (\ ! conjoint))))
(def: .public success
(-> ///.Target Text)
@@ -42,8 +42,8 @@
[_ (..clean_files! fs root)
_ (|> root
(\ fs sub_directories)
- (\ ! map (monad.map ! recur))
- (\ ! join))]
+ (\ ! each (monad.each ! recur))
+ (\ ! conjoint))]
(\ fs delete root)))
(\ ! in [])))]
(console.write_line (..success target) console)))
diff --git a/stdlib/source/program/aedifex/command/deploy.lux b/stdlib/source/program/aedifex/command/deploy.lux
index 62ec8e985..fc0562699 100644
--- a/stdlib/source/program/aedifex/command/deploy.lux
+++ b/stdlib/source/program/aedifex/command/deploy.lux
@@ -63,7 +63,7 @@
(value@ #/.sources)
set.list
(export.library fs)
- (\ ! map (binary.result tar.writer)))
+ (\ ! each (binary.result tar.writer)))
pom (\ async.monad in (///pom.write profile))
_ (///dependency/deployment.one
repository
diff --git a/stdlib/source/program/aedifex/command/pom.lux b/stdlib/source/program/aedifex/command/pom.lux
index c43982a98..9c449a0b9 100644
--- a/stdlib/source/program/aedifex/command/pom.lux
+++ b/stdlib/source/program/aedifex/command/pom.lux
@@ -29,8 +29,8 @@
(-> (Console Async) (file.System Async) (Command Any))
(do ///action.monad
[content (|> (///pom.write profile)
- (try\map (|>> (\ xml.codec encoded)
- (\ utf8.codec encoded)))
+ (try\each (|>> (\ xml.codec encoded)
+ (\ utf8.codec encoded)))
async\in)
_ (\ fs write content ///pom.file)]
(console.write_line ..success console)))
diff --git a/stdlib/source/program/aedifex/dependency/deployment.lux b/stdlib/source/program/aedifex/dependency/deployment.lux
index c637ae931..22788dc3d 100644
--- a/stdlib/source/program/aedifex/dependency/deployment.lux
+++ b/stdlib/source/program/aedifex/dependency/deployment.lux
@@ -111,8 +111,8 @@
#///artifact/snapshot/version/value.snapshot versioning_snapshot})
#///artifact/snapshot/version.updated now}))
... (with@ [#///metadata/snapshot.versioning #///artifact/versioning.snapshot]
- ... (list\compose (..artifacts type (product.right (value@ #///package.library package)))
- ... (..artifacts ///artifact/type.pom (product.right (value@ #///package.pom package)))))
+ ... (list\composite (..artifacts type (product.right (value@ #///package.library package)))
+ ... (..artifacts ///artifact/type.pom (product.right (value@ #///package.pom package)))))
))))
(def: .public (one repository [artifact type] package)
@@ -144,6 +144,6 @@
(-> (Repository Async) Resolution (Async (Try (Set Artifact))))
(let [! (try.with async.monad)]
(|> (dictionary.entries resolution)
- (monad.map ! (function (_ [dependency package])
- (..one repository dependency package)))
- (\ ! map (set.of_list ///artifact.hash)))))
+ (monad.each ! (function (_ [dependency package])
+ (..one repository dependency package)))
+ (\ ! each (set.of_list ///artifact.hash)))))
diff --git a/stdlib/source/program/aedifex/dependency/resolution.lux b/stdlib/source/program/aedifex/dependency/resolution.lux
index 50415b61f..8de6d2423 100644
--- a/stdlib/source/program/aedifex/dependency/resolution.lux
+++ b/stdlib/source/program/aedifex/dependency/resolution.lux
@@ -84,10 +84,10 @@
(case ?actual
(#try.Success actual)
(in (do {! try.monad}
- [output (\ ! map (for {@.old (|>> (:as java/lang/String)
- java/lang/String::trim
- (:as Text))
- @.jvm (|>> java/lang/String::trim)})
+ [output (\ ! each (for {@.old (|>> (:as java/lang/String)
+ java/lang/String::trim
+ (:as Text))
+ @.jvm (|>> java/lang/String::trim)})
(\ utf8.codec decoded actual))
actual (|> output
(text.all_split_by " ")
@@ -234,15 +234,15 @@
(do !
[.let [sub_dependencies (|> package
///package.dependencies
- (try\map set.list)
+ (try\each set.list)
(try.else (list)))
... For security reasons, it's not a good idea to allow dependencies to introduce repositories.
... package_repositories (|> package
... ///package.repositories
- ... (try\map set.list)
+ ... (try\each set.list)
... (try.else (list))
- ... (list\map new_repository))
- ... sub_repositories (list\compose repositories package_repositories)
+ ... (list\each new_repository))
+ ... sub_repositories (list\composite repositories package_repositories)
sub_repositories repositories]
[successes failures resolution] (recur sub_repositories
(#.Item head successes)
diff --git a/stdlib/source/program/aedifex/format.lux b/stdlib/source/program/aedifex/format.lux
index 74583c8f5..d36d597b3 100644
--- a/stdlib/source/program/aedifex/format.lux
+++ b/stdlib/source/program/aedifex/format.lux
@@ -59,8 +59,8 @@
(def: aggregate
(Format Aggregate)
(|>> dictionary.entries
- (list\map (function (_ [key value])
- [(code.local_tag key) value]))
+ (list\each (function (_ [key value])
+ [(code.local_tag key) value]))
code.record))
(def: empty
@@ -85,7 +85,7 @@
aggregate
value
- (dictionary.has field (` [(~+ (list\map format value))]) aggregate)))
+ (dictionary.has field (` [(~+ (list\each format value))]) aggregate)))
(def: (on_set field value format aggregate)
(All [a]
@@ -100,8 +100,8 @@
(dictionary.has field
(|> value
dictionary.entries
- (list\map (function (_ [key value])
- [(key_format key) (value_format value)]))
+ (list\each (function (_ [key value])
+ [(key_format key) (value_format value)]))
code.record)
aggregate)))
@@ -137,7 +137,7 @@
(def: (runtime [program parameters])
(Format Runtime)
(` [(~ (code.text program))
- (~+ (list\map code.text parameters))]))
+ (~+ (list\each code.text parameters))]))
(def: .public (profile value)
(Format /.Profile)
@@ -166,6 +166,6 @@
(def: .public project
(Format Project)
(|>> dictionary.entries
- (list\map (function (_ [key value])
- [(code.text key) (..profile value)]))
+ (list\each (function (_ [key value])
+ [(code.text key) (..profile value)]))
code.record))
diff --git a/stdlib/source/program/aedifex/input.lux b/stdlib/source/program/aedifex/input.lux
index b78e502a6..27591c709 100644
--- a/stdlib/source/program/aedifex/input.lux
+++ b/stdlib/source/program/aedifex/input.lux
@@ -50,7 +50,7 @@
(All [!] (-> (Monad !) (file.System !) Text (! (Try Profile))))
(|> //project.file
(\ fs read)
- (\ monad map (|>> (do> try.monad
- []
- [..project_parser]
- [(//project.profile profile)])))))
+ (\ monad each (|>> (do> try.monad
+ []
+ [..project_parser]
+ [(//project.profile profile)])))))
diff --git a/stdlib/source/program/aedifex/metadata/artifact.lux b/stdlib/source/program/aedifex/metadata/artifact.lux
index d8134515c..85fe747bd 100644
--- a/stdlib/source/program/aedifex/metadata/artifact.lux
+++ b/stdlib/source/program/aedifex/metadata/artifact.lux
@@ -93,7 +93,7 @@
(def: versions_format
(-> (List Version) XML)
- (|>> (list\map ..version_format) (#xml.Node ..<versions> xml.attributes)))
+ (|>> (list\each ..version_format) (#xml.Node ..<versions> xml.attributes)))
(def: .public (format value)
(-> Metadata XML)
diff --git a/stdlib/source/program/aedifex/metadata/snapshot.lux b/stdlib/source/program/aedifex/metadata/snapshot.lux
index 3852f5fe1..3a3464cd6 100644
--- a/stdlib/source/program/aedifex/metadata/snapshot.lux
+++ b/stdlib/source/program/aedifex/metadata/snapshot.lux
@@ -94,7 +94,7 @@
#///artifact/snapshot/version.value version
#///artifact/snapshot/version.updated ///artifact/time.epoch}]
(|> (<xml>.somewhere ///artifact/versioning.parser)
- (\ ! map
+ (\ ! each
(revised@ #///artifact/versioning.versions
(: (-> (List ///artifact/snapshot/version.Version)
(List ///artifact/snapshot/version.Version))
diff --git a/stdlib/source/program/aedifex/package.lux b/stdlib/source/program/aedifex/package.lux
index 7611cdac9..6a3a71f6d 100644
--- a/stdlib/source/program/aedifex/package.lux
+++ b/stdlib/source/program/aedifex/package.lux
@@ -65,7 +65,7 @@
product.left
list
(<xml>.result //pom.parser)
- (try\map (value@ #/.dependencies))))
+ (try\each (value@ #/.dependencies))))
(def: .public repositories
(-> Package (Try (Set Address)))
@@ -73,7 +73,7 @@
product.left
list
(<xml>.result //pom.parser)
- (try\map (value@ #/.repositories))))
+ (try\each (value@ #/.repositories))))
(def: .public equivalence
(Equivalence Package)
diff --git a/stdlib/source/program/aedifex/parser.lux b/stdlib/source/program/aedifex/parser.lux
index d5f4d3bb8..8ece73b51 100644
--- a/stdlib/source/program/aedifex/parser.lux
+++ b/stdlib/source/program/aedifex/parser.lux
@@ -82,7 +82,7 @@
(def: license
(Parser /.License)
(do {! <>.monad}
- [input (\ ! map
+ [input (\ ! each
(dictionary.of_list text.hash)
(<code>.record (<>.some (<>.and <code>.local_tag
<code>.any))))]
@@ -97,7 +97,7 @@
(def: organization
(Parser /.Organization)
(do {! <>.monad}
- [input (\ ! map
+ [input (\ ! each
(dictionary.of_list text.hash)
(<code>.record (<>.some (<>.and <code>.local_tag
<code>.any))))]
@@ -108,7 +108,7 @@
(def: developer
(Parser /.Developer)
(do {! <>.monad}
- [input (\ ! map
+ [input (\ ! each
(dictionary.of_list text.hash)
(<code>.record (<>.some (<>.and <code>.local_tag
<code>.any))))]
@@ -125,7 +125,7 @@
(def: info
(Parser /.Info)
(do {! <>.monad}
- [input (\ ! map
+ [input (\ ! each
(dictionary.of_list text.hash)
(<code>.record (<>.some (<>.and <code>.local_tag
<code>.any))))]
@@ -181,7 +181,7 @@
(def: profile
(Parser /.Profile)
(do {! <>.monad}
- [input (\ ! map
+ [input (\ ! each
(dictionary.of_list text.hash)
(<code>.record (<>.some (<>.and <code>.local_tag
<code>.any))))
@@ -196,19 +196,19 @@
(..singular input "info" ..info)))
^repositories (: (Parser (Set //repository.Address))
(|> (..plural input "repositories" ..repository)
- (\ ! map (set.of_list text.hash))
+ (\ ! each (set.of_list text.hash))
(<>.else (set.empty text.hash))
- (\ ! map (set.has /.default_repository))))
+ (\ ! each (set.has /.default_repository))))
^dependencies (: (Parser (Set //dependency.Dependency))
(|> (..plural input "dependencies" ..dependency)
- (\ ! map (set.of_list //dependency.hash))
+ (\ ! each (set.of_list //dependency.hash))
(<>.else (set.empty //dependency.hash))))
^compiler (|> ..dependency
(..singular input "compiler")
(<>.else /.default_compiler))
^sources (: (Parser (Set /.Source))
(|> (..plural input "sources" ..source)
- (\ ! map (set.of_list text.hash))
+ (\ ! each (set.of_list text.hash))
(<>.else (set.of_list text.hash (list /.default_source)))))
^target (: (Parser /.Target)
(|> ..target
@@ -221,7 +221,7 @@
(<>.maybe
(..singular input "test" ..module)))
^deploy_repositories (: (Parser (Dictionary Text //repository.Address))
- (<| (\ ! map (dictionary.of_list text.hash))
+ (<| (\ ! each (dictionary.of_list text.hash))
(<>.else (list))
(..singular input "deploy_repositories" ..deploy_repository)))
^java (|> ..runtime
@@ -261,11 +261,11 @@
(def: .public project
(Parser Project)
(let [default_profile (: (Parser Project)
- (\ <>.monad map
+ (\ <>.monad each
(|>> [/.default] (list) (dictionary.of_list text.hash))
..profile))
multi_profile (: (Parser Project)
- (\ <>.monad map
+ (\ <>.monad each
(dictionary.of_list text.hash)
(<code>.record (<>.many (<>.and <code>.text
..profile)))))]
diff --git a/stdlib/source/program/aedifex/pom.lux b/stdlib/source/program/aedifex/pom.lux
index 7f9464e5c..a093a4091 100644
--- a/stdlib/source/program/aedifex/pom.lux
+++ b/stdlib/source/program/aedifex/pom.lux
@@ -85,8 +85,8 @@
(-> Dependency XML)
(#_.Node ["" ..dependency_tag]
_.attributes
- (list\compose (..artifact (value@ #//dependency.artifact value))
- (list (..property "type" (value@ #//dependency.type value))))))
+ (list\composite (..artifact (value@ #//dependency.artifact value))
+ (list (..property "type" (value@ #//dependency.type value))))))
(def: (group tag)
(-> Text (-> (List XML) XML))
@@ -114,7 +114,7 @@
(-> /.Developer (List XML))
(list& (..property "name" name)
(..property "email" email)
- (|> organization (maybe\map ..developer_organization) (maybe.else (list)))))
+ (|> organization (maybe\each ..developer_organization) (maybe.else (list)))))
(template [<name> <type> <tag>]
[(def: <name>
@@ -127,14 +127,14 @@
(def: (info value)
(-> /.Info (List XML))
- ($_ list\compose
- (|> value (value@ #/.url) (maybe\map (..property ..url_tag)) maybe.list)
- (|> value (value@ #/.description) (maybe\map (..property "description")) maybe.list)
- (|> value (value@ #/.licenses) (list\map ..license) (..group "licenses") list)
- (|> value (value@ #/.scm) (maybe\map ..scm) maybe.list)
- (|> value (value@ #/.organization) (maybe\map ..organization) maybe.list)
- (|> value (value@ #/.developers) (list\map ..developer) (..group "developers") list)
- (|> value (value@ #/.contributors) (list\map ..contributor) (..group "contributors") list)
+ ($_ list\composite
+ (|> value (value@ #/.url) (maybe\each (..property ..url_tag)) maybe.list)
+ (|> value (value@ #/.description) (maybe\each (..property "description")) maybe.list)
+ (|> value (value@ #/.licenses) (list\each ..license) (..group "licenses") list)
+ (|> value (value@ #/.scm) (maybe\each ..scm) maybe.list)
+ (|> value (value@ #/.organization) (maybe\each ..organization) maybe.list)
+ (|> value (value@ #/.developers) (list\each ..developer) (..group "developers") list)
+ (|> value (value@ #/.contributors) (list\each ..contributor) (..group "contributors") list)
))
)
@@ -144,11 +144,11 @@
(#.Some identity)
(#try.Success
(#_.Node ["" ..project_tag] _.attributes
- ($_ list\compose
+ ($_ list\composite
(list ..version)
(..artifact identity)
- (|> value (value@ #/.repositories) set.list (list\map ..repository) (..group "repositories") list)
- (|> value (value@ #/.dependencies) set.list (list\map ..dependency) (..group ..dependencies_tag) list)
+ (|> value (value@ #/.repositories) set.list (list\each ..repository) (..group "repositories") list)
+ (|> value (value@ #/.dependencies) set.list (list\each ..dependency) (..group ..dependencies_tag) list)
)))
_
@@ -159,13 +159,13 @@
(do {! <>.monad}
[tag <xml>.tag]
(<| (<xml>.node tag)
- (\ ! map (|>> [tag]))
+ (\ ! each (|>> [tag]))
<xml>.text)))
(def: (dependency_parser own_version parent_version)
(-> Text Text (Parser Dependency))
(do {! <>.monad}
- [properties (\ ! map (dictionary.of_list name.hash)
+ [properties (\ ! each (dictionary.of_list name.hash)
(<| (<xml>.node ["" ..dependency_tag])
(<>.some ..property_parser)))]
(<| <>.lifted
diff --git a/stdlib/source/program/aedifex/profile.lux b/stdlib/source/program/aedifex/profile.lux
index f4a1f9a0d..264bc9015 100644
--- a/stdlib/source/program/aedifex/profile.lux
+++ b/stdlib/source/program/aedifex/profile.lux
@@ -228,14 +228,14 @@
#lua runtime.default_lua
#ruby runtime.default_ruby})
- (def: (compose override baseline)
+ (def: (composite override baseline)
(template.let [(!runtime <tag> <runtime>)
[(if (runtime\= <runtime> (value@ <tag> override))
(value@ <tag> baseline)
(value@ <tag> override))]]
- {#parents (list\compose (value@ #parents baseline) (value@ #parents override))
- #identity (maybe\compose (value@ #identity override) (value@ #identity baseline))
- #info (maybe\compose (value@ #info override) (value@ #info baseline))
+ {#parents (list\composite (value@ #parents baseline) (value@ #parents override))
+ #identity (maybe\composite (value@ #identity override) (value@ #identity baseline))
+ #info (maybe\composite (value@ #info override) (value@ #info baseline))
#repositories (set.union (value@ #repositories baseline) (value@ #repositories override))
#dependencies (set.union (value@ #dependencies baseline) (value@ #dependencies override))
#compiler (if (dependency\= ..default_compiler (value@ #compiler override))
@@ -245,8 +245,8 @@
#target (if (text\= ..default_target (value@ #target baseline))
(value@ #target override)
(value@ #target baseline))
- #program (maybe\compose (value@ #program override) (value@ #program baseline))
- #test (maybe\compose (value@ #test override) (value@ #test baseline))
+ #program (maybe\composite (value@ #program override) (value@ #program baseline))
+ #test (maybe\composite (value@ #test override) (value@ #test baseline))
#deploy_repositories (dictionary.merged (value@ #deploy_repositories override) (value@ #deploy_repositories baseline))
#java (!runtime #java runtime.default_java)
#js (!runtime #js runtime.default_js)
diff --git a/stdlib/source/program/aedifex/project.lux b/stdlib/source/program/aedifex/project.lux
index 687fd215b..4f6da6d62 100644
--- a/stdlib/source/program/aedifex/project.lux
+++ b/stdlib/source/program/aedifex/project.lux
@@ -38,8 +38,8 @@
(def: identity
(dictionary.empty text.hash))
- (def: compose
- (dictionary.merged_with (\ //.monoid compose))))
+ (def: composite
+ (dictionary.merged_with (\ //.monoid composite))))
(exception: .public (unknown_profile {name Name})
(exception.report
@@ -61,10 +61,10 @@
#.None
(do {! try.monad}
- [parents (monad.map ! (profile' (set.has name lineage) project)
- (value@ #//.parents profile))]
+ [parents (monad.each ! (profile' (set.has name lineage) project)
+ (value@ #//.parents profile))]
(in (list\mix (function (_ parent child)
- (\ //.monoid compose child parent))
+ (\ //.monoid composite child parent))
(with@ #//.parents (list) profile)
parents))))
diff --git a/stdlib/source/program/aedifex/repository/remote.lux b/stdlib/source/program/aedifex/repository/remote.lux
index 11d29716e..d6cea3f06 100644
--- a/stdlib/source/program/aedifex/repository/remote.lux
+++ b/stdlib/source/program/aedifex/repository/remote.lux
@@ -68,7 +68,7 @@
http))]
(case status
(^ (static http/status.ok))
- (\ ! map product.right ((value@ #@http.body message) #.None))
+ (\ ! each product.right ((value@ #@http.body message) #.None))
_
(do !
diff --git a/stdlib/source/program/aedifex/runtime.lux b/stdlib/source/program/aedifex/runtime.lux
index f029bed15..addfd4a52 100644
--- a/stdlib/source/program/aedifex/runtime.lux
+++ b/stdlib/source/program/aedifex/runtime.lux
@@ -42,5 +42,5 @@
(-> Runtime file.Path Runtime)
(revised@ #parameters
(function (_ parameters)
- (list\compose parameters (list path)))
+ (list\composite parameters (list path)))
runtime))
diff --git a/stdlib/source/program/compositor.lux b/stdlib/source/program/compositor.lux
index 184914216..637ed76e1 100644
--- a/stdlib/source/program/compositor.lux
+++ b/stdlib/source/program/compositor.lux
@@ -179,6 +179,6 @@
... (do {! async.monad}
... [console (|> console.default
... async.future
- ... (\ ! map (|>> try.trusted console.async)))]
+ ... (\ ! each (|>> try.trusted console.async)))]
... (interpreter.run! (try.with async.monad) console platform interpretation generation_bundle)))
))))
diff --git a/stdlib/source/program/compositor/export.lux b/stdlib/source/program/compositor/export.lux
index 309678908..a9c76f039 100644
--- a/stdlib/source/program/compositor/export.lux
+++ b/stdlib/source/program/compositor/export.lux
@@ -44,28 +44,28 @@
(do (try.with async.monad)
[files (io.listing fs sources)]
(|> (dictionary.entries files)
- (monad.map try.monad
- (function (_ [path source_code])
- (do try.monad
- [path (|> path
- (text.replaced (\ fs separator) .module_separator)
- tar.path)
- source_code (tar.content source_code)]
- (in (#tar.Normal [path
- (instant.of_millis +0)
- ($_ tar.and
- tar.read_by_owner tar.write_by_owner
- tar.read_by_group tar.write_by_group
- tar.read_by_other)
- ..no_ownership
- source_code])))))
- (\ try.monad map row.of_list)
+ (monad.each try.monad
+ (function (_ [path source_code])
+ (do try.monad
+ [path (|> path
+ (text.replaced (\ fs separator) .module_separator)
+ tar.path)
+ source_code (tar.content source_code)]
+ (in (#tar.Normal [path
+ (instant.of_millis +0)
+ ($_ tar.and
+ tar.read_by_owner tar.write_by_owner
+ tar.read_by_group tar.write_by_group
+ tar.read_by_other)
+ ..no_ownership
+ source_code])))))
+ (\ try.monad each row.of_list)
(\ async.monad in))))
(def: .public (export fs [sources target])
(-> (file.System Async) Export (Async (Try Any)))
(do {! (try.with async.monad)}
- [tar (\ ! map (binary.result tar.writer)
+ [tar (\ ! each (binary.result tar.writer)
(..library fs sources))]
(|> ..file
(format target (\ fs separator))
diff --git a/stdlib/source/program/compositor/import.lux b/stdlib/source/program/compositor/import.lux
index 1950c4ebb..d05867201 100644
--- a/stdlib/source/program/compositor/import.lux
+++ b/stdlib/source/program/compositor/import.lux
@@ -47,25 +47,25 @@
(let [! async.monad]
(|> library
(\ system read)
- (\ ! map (let [! try.monad]
- (|>> (\ ! map (<binary>.result tar.parser))
- (\ ! join)
- (\ ! map (|>> row.list
- (monad.mix ! (function (_ entry import)
- (case entry
- (#tar.Normal [path instant mode ownership content])
- (let [path (tar.from_path path)]
- (case (dictionary.has' path (tar.data content) import)
- (#try.Failure error)
- (exception.except ..duplicate [library path])
+ (\ ! each (let [! try.monad]
+ (|>> (\ ! each (<binary>.result tar.parser))
+ (\ ! conjoint)
+ (\ ! each (|>> row.list
+ (monad.mix ! (function (_ entry import)
+ (case entry
+ (#tar.Normal [path instant mode ownership content])
+ (let [path (tar.from_path path)]
+ (case (dictionary.has' path (tar.data content) import)
+ (#try.Failure error)
+ (exception.except ..duplicate [library path])
- import'
- import'))
-
- _
- (exception.except ..useless_tar_entry [])))
- import)))
- (\ ! join)))))))
+ import'
+ import'))
+
+ _
+ (exception.except ..useless_tar_entry [])))
+ import)))
+ (\ ! conjoint)))))))
(def: .public (import system libraries)
(-> (file.System Async) (List Library) (Action Import))
diff --git a/stdlib/source/program/scriptum.lux b/stdlib/source/program/scriptum.lux
index e99367e91..6841682df 100644
--- a/stdlib/source/program/scriptum.lux
+++ b/stdlib/source/program/scriptum.lux
@@ -51,7 +51,7 @@
(def: type_var_names
(Sequence Text)
- (|> 0 (sequence.iterations ++) (sequence\map parameter_type_name)))
+ (|> 0 (sequence.iterations ++) (sequence\each parameter_type_name)))
(template [<name> <partition>]
[(def: (<name> id)
@@ -88,13 +88,13 @@
(|> level
--
(enum.range n.enum 0)
- (list\map (|>> (n.+ (++ offset)) parameter_type_name)))))
+ (list\each (|>> (n.+ (++ offset)) parameter_type_name)))))
(def: (prefix_lines prefix lines)
(-> Text Text Text)
(|> lines
(text.all_split_by text.new_line)
- (list\map (|>> (format prefix)))
+ (list\each (|>> (format prefix)))
(text.interposed text.new_line)))
(def: (pprint_type_definition level type_func_info tags module interface? recursive_type? type)
@@ -113,7 +113,7 @@
(format "(primitive " (%.text name) ")")
_
- (format "(primitive " (%.text name) " " (|> params (list\map (pprint_type_definition level type_func_info #.None module interface? recursive_type?)) (text.interposed " ")) ")"))
+ (format "(primitive " (%.text name) " " (|> params (list\each (pprint_type_definition level type_func_info #.None module interface? recursive_type?)) (text.interposed " ")) ")"))
[_ (#.Sum _)]
(let [members (type.flat_variant type)]
@@ -121,40 +121,40 @@
#.End
(format "(Or "
(|> members
- (list\map (pprint_type_definition level type_func_info #.None module interface? recursive_type?))
+ (list\each (pprint_type_definition level type_func_info #.None module interface? recursive_type?))
(text.interposed " "))
")")
_
(|> members
(list.zipped/2 tags)
- (list\map (function (_ [[_ t_name] type])
- (case type
- (#.Product _)
- (let [types (type.flat_tuple type)]
- (format "(#" t_name " "
- (|> types
- (list\map (pprint_type_definition level type_func_info #.None module interface? recursive_type?))
- (text.interposed " "))
- ")"))
-
- _
- (format "(#" t_name " " (pprint_type_definition level type_func_info #.None module interface? recursive_type? type) ")"))))
+ (list\each (function (_ [[_ t_name] type])
+ (case type
+ (#.Product _)
+ (let [types (type.flat_tuple type)]
+ (format "(#" t_name " "
+ (|> types
+ (list\each (pprint_type_definition level type_func_info #.None module interface? recursive_type?))
+ (text.interposed " "))
+ ")"))
+
+ _
+ (format "(#" t_name " " (pprint_type_definition level type_func_info #.None module interface? recursive_type? type) ")"))))
(text.interposed text.new_line))))
[_ (#.Product _)]
(let [members (type.flat_tuple type)]
(case tags
#.End
- (format "[" (|> members (list\map (pprint_type_definition level type_func_info #.None module interface? recursive_type?)) (text.interposed " ")) "]")
+ (format "[" (|> members (list\each (pprint_type_definition level type_func_info #.None module interface? recursive_type?)) (text.interposed " ")) "]")
_
(let [member_docs (|> members
(list.zipped/2 tags)
- (list\map (function (_ [[_ t_name] type])
- (if interface?
- (format "(: " (pprint_type_definition level type_func_info #.None module interface? recursive_type? type) text.new_line " " t_name ")")
- (format "#" t_name " " (pprint_type_definition level type_func_info #.None module interface? recursive_type? type)))))
+ (list\each (function (_ [[_ t_name] type])
+ (if interface?
+ (format "(: " (pprint_type_definition level type_func_info #.None module interface? recursive_type? type) text.new_line " " t_name ")")
+ (format "#" t_name " " (pprint_type_definition level type_func_info #.None module interface? recursive_type? type)))))
(text.interposed (format text.new_line " ")))]
(if interface?
member_docs
@@ -162,7 +162,7 @@
[_ (#.Function input output)]
(let [[ins out] (type.flat_function type)]
- (format "(-> " (|> ins (list\map (pprint_type_definition level type_func_info #.None module interface? recursive_type?)) (text.interposed " "))
+ (format "(-> " (|> ins (list\each (pprint_type_definition level type_func_info #.None module interface? recursive_type?)) (text.interposed " "))
" "
(pprint_type_definition level type_func_info #.None module interface? recursive_type? out)
")"))
@@ -197,7 +197,7 @@
[_ (#.Apply param fun)]
(let [[type_func type_arguments] (type.flat_application type)]
- (format "(" (pprint_type_definition level type_func_info tags module interface? recursive_type? type_func) " " (|> type_arguments (list\map (pprint_type_definition level type_func_info #.None module interface? recursive_type?)) (text.interposed " ")) ")"))
+ (format "(" (pprint_type_definition level type_func_info tags module interface? recursive_type? type_func) " " (|> type_arguments (list\each (pprint_type_definition level type_func_info #.None module interface? recursive_type?)) (text.interposed " ")) ")"))
[_ (#.Named [_module _name] type)]
(if (text\= module _module)
@@ -214,20 +214,20 @@
(format "(primitive " (%.text name) ")")
_
- (format "(primitive " (%.text name) " " (|> params (list\map (pprint_type level type_func_name module)) (text.interposed " ")) ")"))
+ (format "(primitive " (%.text name) " " (|> params (list\each (pprint_type level type_func_name module)) (text.interposed " ")) ")"))
(#.Sum _)
(let [members (type.flat_variant type)]
- (format "(Or " (|> members (list\map (pprint_type level type_func_name module)) (text.interposed " ")) ")"))
+ (format "(Or " (|> members (list\each (pprint_type level type_func_name module)) (text.interposed " ")) ")"))
(#.Product _)
(let [members (type.flat_tuple type)]
- (format "[" (|> members (list\map (pprint_type level type_func_name module)) (text.interposed " ")) "]"))
+ (format "[" (|> members (list\each (pprint_type level type_func_name module)) (text.interposed " ")) "]"))
(#.Function input output)
(let [[ins out] (type.flat_function type)]
(format "(-> "
- (|> ins (list\map (pprint_type level type_func_name module)) (text.interposed " "))
+ (|> ins (list\each (pprint_type level type_func_name module)) (text.interposed " "))
" "
(pprint_type level type_func_name module out)
")"))
@@ -254,7 +254,7 @@
(#.Apply param fun)
(let [[type_func type_arguments] (type.flat_application type)]
- (format "(" (pprint_type level type_func_name module type_func) " " (|> type_arguments (list\map (pprint_type level type_func_name module)) (text.interposed " ")) ")"))
+ (format "(" (pprint_type level type_func_name module type_func) " " (|> type_arguments (list\each (pprint_type level type_func_name module)) (text.interposed " ")) ")"))
(#.Named [_module _name] type)
(if (text\= module _module)
@@ -373,7 +373,7 @@
(when> [(new> recursive_type? [])] [unrecurse_type])
(pprint_type_definition (-- nesting) [_name type_arguments] (maybe.else (list) tags) module interface? recursive_type?)
(text.all_split_by text.new_line)
- (list\map (|>> (format " ")))
+ (list\each (|>> (format " ")))
(text.interposed text.new_line))
")"))))
@@ -383,22 +383,22 @@
(def: (document_types module types)
(-> Text (List Value) (Meta (Markdown Block)))
(do {! meta.monad}
- [type_docs (monad.map !
- (: (-> Value (Meta (Markdown Block)))
- (function (_ [name def_annotations type])
- (do meta.monad
- [.let [?doc (annotation.documentation def_annotations)]
- type_code (document_type module type def_annotations)]
- (in ($_ md.then
- (md.heading/3 name)
- (case ?doc
- (#.Some doc)
- (md.paragraph (md.text doc))
-
- _
- md.empty)
- type_code)))))
- types)]
+ [type_docs (monad.each !
+ (: (-> Value (Meta (Markdown Block)))
+ (function (_ [name def_annotations type])
+ (do meta.monad
+ [.let [?doc (annotation.documentation def_annotations)]
+ type_code (document_type module type def_annotations)]
+ (in ($_ md.then
+ (md.heading/3 name)
+ (case ?doc
+ (#.Some doc)
+ (md.paragraph (md.text doc))
+
+ _
+ md.empty)
+ type_code)))))
+ types)]
(in (list\mix (function.flipped md.then)
(md.heading/2 "Types")
type_docs))))
@@ -406,15 +406,15 @@
(def: (document_macros module_name names)
(-> Text (List [Text Code]) (Markdown Block))
(|> names
- (list\map (: (-> [Text Code] (Markdown Block))
- (function (_ [name def_annotations])
- ($_ md.then
- (md.heading/3 name)
- (<| (: (Markdown Block))
- (maybe.else md.empty)
- (do maybe.monad
- [documentation (annotation.documentation def_annotations)]
- (in (md.code documentation))))))))
+ (list\each (: (-> [Text Code] (Markdown Block))
+ (function (_ [name def_annotations])
+ ($_ md.then
+ (md.heading/3 name)
+ (<| (: (Markdown Block))
+ (maybe.else md.empty)
+ (do maybe.monad
+ [documentation (annotation.documentation def_annotations)]
+ (in (md.code documentation))))))))
(list\mix (function.flipped md.then)
(md.heading/2 "Macros"))))
@@ -426,23 +426,23 @@
(def: (<plural> module values)
(-> Text (List Value) (Markdown Block))
(|> values
- (list\map (function (_ [name def_annotations value_type])
- (let [?doc (annotation.documentation def_annotations)
- usage (case (annotation.function_arguments def_annotations)
- #.End
- name
-
- args
- (format "(" (text.interposed " " (list& name args)) ")"))]
- ($_ md.then
- (md.heading/3 usage)
- (case ?doc
- (#.Some doc)
- (md.code doc)
-
- _
- md.empty)
- (<singular> module value_type)))))
+ (list\each (function (_ [name def_annotations value_type])
+ (let [?doc (annotation.documentation def_annotations)
+ usage (case (annotation.function_arguments def_annotations)
+ #.End
+ name
+
+ args
+ (format "(" (text.interposed " " (list& name args)) ")"))]
+ ($_ md.then
+ (md.heading/3 usage)
+ (case ?doc
+ (#.Some doc)
+ (md.code doc)
+
+ _
+ md.empty)
+ (<singular> module value_type)))))
(list\mix (function.flipped md.then)
(md.heading/2 <header>))))]
@@ -454,7 +454,7 @@
(-> [Text Text] Text Text)
(|> block
(text.all_split_by text.new_line)
- (list\map (text.enclosed pre+post))
+ (list\each (text.enclosed pre+post))
(text.interposed text.new_line)))
(def: (document_module [[module_name module] organization])
@@ -507,12 +507,12 @@
.let [lux_modules (|> all_modules
(list.only (function.composite lux_module? product.left))
(list.sorted name_sort))]
- lux_exports (monad.map ! (function.composite meta.exports product.left)
- lux_modules)
- module_documentation (|> (list\map organize_definitions lux_exports)
+ lux_exports (monad.each ! (function.composite meta.exports product.left)
+ lux_modules)
+ module_documentation (|> (list\each organize_definitions lux_exports)
(list.zipped/2 lux_modules)
- (monad.map ! document_module))
- .let [_ (io.run! (monad.map io.monad save_documentation! module_documentation))]]
+ (monad.each ! document_module))
+ .let [_ (io.run! (monad.each io.monad save_documentation! module_documentation))]]
(in (list))))
(gen_documentation!)