aboutsummaryrefslogtreecommitdiff
path: root/stdlib/source/test/aedifex/command
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/test/aedifex/command
parentec1f31b5a1492d5e0ab260397291d4449483bbd9 (diff)
Outsourced the syntax for labelled type definitions to macros.
Diffstat (limited to 'stdlib/source/test/aedifex/command')
-rw-r--r--stdlib/source/test/aedifex/command/auto.lux14
-rw-r--r--stdlib/source/test/aedifex/command/build.lux12
-rw-r--r--stdlib/source/test/aedifex/command/clean.lux10
-rw-r--r--stdlib/source/test/aedifex/command/deploy.lux2
-rw-r--r--stdlib/source/test/aedifex/command/install.lux22
-rw-r--r--stdlib/source/test/aedifex/command/pom.lux6
6 files changed, 33 insertions, 33 deletions
diff --git a/stdlib/source/test/aedifex/command/auto.lux b/stdlib/source/test/aedifex/command/auto.lux
index 1ed19ddf7..91506ca06 100644
--- a/stdlib/source/test/aedifex/command/auto.lux
+++ b/stdlib/source/test/aedifex/command/auto.lux
@@ -89,8 +89,8 @@
home (random.ascii/alpha 5)
working_directory (random.ascii/alpha 5)
- expected_runs (\ ! map (|>> (n.% 10) (n.max 2)) random.nat)
- dummy_path (\ ! map (|>> (format source /)) (random.ascii/alpha 5))
+ expected_runs (\ ! each (|>> (n.% 10) (n.max 2)) random.nat)
+ dummy_path (\ ! each (|>> (format source /)) (random.ascii/alpha 5))
[compiler resolution] $build.resolution]
($_ _.and
(_.cover [/.delay]
@@ -110,15 +110,15 @@
fs
(shell.async ($build.good_shell []))
resolution)
- (\ ! map (|>> (case> (#try.Failure error)
- (same? end_signal error)
+ (\ ! each (|>> (case> (#try.Failure error)
+ (same? end_signal error)
- (#try.Success _)
- false))))
+ (#try.Success _)
+ false))))
correct_number_of_runs! (|> @runs
atom.read!
async.future
- (\ ! map (n.= expected_runs)))]
+ (\ ! each (n.= expected_runs)))]
(in (#try.Success (and correct_number_of_runs!
no_dangling_process!)))))]
(_.cover' [/.do!]
diff --git a/stdlib/source/test/aedifex/command/build.lux b/stdlib/source/test/aedifex/command/build.lux
index 03625f0c1..ff5f7450b 100644
--- a/stdlib/source/test/aedifex/command/build.lux
+++ b/stdlib/source/test/aedifex/command/build.lux
@@ -232,12 +232,12 @@
actual/1 (\ console read_line [])
actual/2 (\ console read_line [])
end! (|> (\ console read_line [])
- (\ ! map (|>> (case> (#try.Failure error)
- true
-
- (#try.Success _)
- false)
- #try.Success)))]
+ (\ ! each (|>> (case> (#try.Failure error)
+ true
+
+ (#try.Success _)
+ false)
+ #try.Success)))]
(in (and (text\= expected/0 actual/0)
(text\= expected/1 actual/1)
(text\= expected/2 actual/2)
diff --git a/stdlib/source/test/aedifex/command/clean.lux b/stdlib/source/test/aedifex/command/clean.lux
index 30ef6eb6f..59908a364 100644
--- a/stdlib/source/test/aedifex/command/clean.lux
+++ b/stdlib/source/test/aedifex/command/clean.lux
@@ -43,10 +43,10 @@
(def: (files prefix)
(-> Path (Random (List [Path Binary])))
(do {! random.monad}
- [count (\ ! map (n.% 10) random.nat)
+ [count (\ ! each (n.% 10) random.nat)
names (random.set text.hash count ..node_name)
contents (random.list count ($binary.random 100))]
- (in (list.zipped/2 (list\map (|>> (format prefix)) (set.list names))
+ (in (list.zipped/2 (list\each (|>> (format prefix)) (set.list names))
contents))))
(def: (create_file! fs [path content])
@@ -58,7 +58,7 @@
(do {! (try.with async.monad)}
[_ (: (Async (Try Any))
(file.make_directories async.monad fs path))
- _ (monad.map ! (..create_file! fs) files)]
+ _ (monad.each ! (..create_file! fs) files)]
(in [])))
(def: (directory_exists? fs)
@@ -75,8 +75,8 @@
[directory_exists? (..directory_exists? fs directory_path)
files_exist? (: (Action (List Bit))
(|> files
- (list\map product.left)
- (monad.map ///action.monad (..file_exists? fs))))]
+ (list\each product.left)
+ (monad.each ///action.monad (..file_exists? fs))))]
(in (and directory_exists?
(list.every? (|>>) files_exist?)))))
diff --git a/stdlib/source/test/aedifex/command/deploy.lux b/stdlib/source/test/aedifex/command/deploy.lux
index 526227f2d..b36998b6f 100644
--- a/stdlib/source/test/aedifex/command/deploy.lux
+++ b/stdlib/source/test/aedifex/command/deploy.lux
@@ -84,7 +84,7 @@
(value@ #///.sources)
set.list
(export.library fs)
- (\ ! map (format.result tar.writer)))
+ (\ ! each (format.result tar.writer)))
actual_pom (\ repository download (///repository/remote.uri (value@ #///artifact.version artifact) artifact ///artifact/extension.pom))
actual_library (\ repository download (///repository/remote.uri (value@ #///artifact.version artifact) artifact ///artifact/extension.lux_library))
diff --git a/stdlib/source/test/aedifex/command/install.lux b/stdlib/source/test/aedifex/command/install.lux
index f1c0c2de1..93d304d36 100644
--- a/stdlib/source/test/aedifex/command/install.lux
+++ b/stdlib/source/test/aedifex/command/install.lux
@@ -45,12 +45,12 @@
! ///action.monad]
(|> sources
set.list
- (monad.map ! (function (_ head)
- (do !
- [_ (: (Async (Try Any))
- (file.make_directories async.monad fs head))]
- (: (Async (Try Any))
- (file.make_file async.monad fs (binary.empty 0) (format head / head ".lux")))))))))
+ (monad.each ! (function (_ head)
+ (do !
+ [_ (: (Async (Try Any))
+ (file.make_directories async.monad fs head))]
+ (: (Async (Try Any))
+ (file.make_file async.monad fs (binary.empty 0) (format head / head ".lux")))))))))
(def: (execute! program fs sample)
(-> (Program Async) (file.System Async) ///.Profile (Async (Try Text)))
@@ -65,7 +65,7 @@
(<| (_.covering /._)
(do {! random.monad}
[identity $artifact.random
- sample (\ ! map (with@ #///.identity (#.Some identity))
+ sample (\ ! each (with@ #///.identity (#.Some identity))
$profile.random)
home (random.ascii/alpha 5)
working_directory (random.ascii/alpha 5)
@@ -79,16 +79,16 @@
library_path (format artifact_path ///artifact/extension.lux_library)
pom_path (format artifact_path ///artifact/extension.pom)]
verdict (do {! ///action.monad}
- [succeeded! (\ ! map (text\= /.success)
+ [succeeded! (\ ! each (text\= /.success)
(..execute! program fs sample))
library_exists! (|> library_path
(format home /)
(\ fs file?)
- (\ async.monad map (|>> #try.Success)))
+ (\ async.monad each (|>> #try.Success)))
pom_exists! (|> pom_path
(format home /)
(\ fs file?)
- (\ async.monad map (|>> #try.Success)))]
+ (\ async.monad each (|>> #try.Success)))]
(in (and succeeded!
library_exists!
pom_exists!)))]
@@ -100,6 +100,6 @@
logging (..execute! program fs (with@ #///.identity #.None sample))]
(_.cover' [/.failure]
(|> logging
- (try\map (text\= /.failure))
+ (try\each (text\= /.failure))
(try.else false)))))
))))
diff --git a/stdlib/source/test/aedifex/command/pom.lux b/stdlib/source/test/aedifex/command/pom.lux
index 7c2097a4d..211ce1ad5 100644
--- a/stdlib/source/test/aedifex/command/pom.lux
+++ b/stdlib/source/test/aedifex/command/pom.lux
@@ -44,12 +44,12 @@
(do !
[verdict (do ///action.monad
[expected (|> (///pom.write sample)
- (try\map (|>> (\ xml.codec encoded)
- (\ utf8.codec encoded)))
+ (try\each (|>> (\ xml.codec encoded)
+ (\ utf8.codec encoded)))
(\ ! in))
actual (\ fs read ///pom.file)
- logging! (\ ///action.monad map
+ logging! (\ ///action.monad each
(text\= /.success)
(\ console read_line []))