aboutsummaryrefslogtreecommitdiff
path: root/stdlib/source/library
diff options
context:
space:
mode:
authorEduardo Julian2022-08-12 22:26:57 -0400
committerEduardo Julian2022-08-12 22:26:57 -0400
commit772f621c19408c711c1e587668a52a8cfeeea418 (patch)
tree94a53cae11dc6fe5d46f993fc30364490e668d16 /stdlib/source/library
parent29922d1411a75f9fb4259d66e427070aae72b3d3 (diff)
Fixes for Aedifex tests.
Diffstat (limited to 'stdlib/source/library')
-rw-r--r--stdlib/source/library/lux/data/collection/list.lux2
-rw-r--r--stdlib/source/library/lux/world/file.lux6
-rw-r--r--stdlib/source/library/lux/world/shell.lux3
3 files changed, 9 insertions, 2 deletions
diff --git a/stdlib/source/library/lux/data/collection/list.lux b/stdlib/source/library/lux/data/collection/list.lux
index 77e5529b1..cddf68036 100644
--- a/stdlib/source/library/lux/data/collection/list.lux
+++ b/stdlib/source/library/lux/data/collection/list.lux
@@ -143,7 +143,7 @@
<else>)))]
[while {.#Item x (while predicate xs')} {.#End}]
- [until (until predicate xs') xs]
+ [until xs (until predicate xs')]
)
(def .public (split_at n xs)
diff --git a/stdlib/source/library/lux/world/file.lux b/stdlib/source/library/lux/world/file.lux
index 1e2bdd90d..11adc36a7 100644
--- a/stdlib/source/library/lux/world/file.lux
+++ b/stdlib/source/library/lux/world/file.lux
@@ -1337,3 +1337,9 @@
(if ?
(in (exception.except ..cannot_make_file [path]))
(at fs write path content))))
+
+(def .public (copy monad fs from to)
+ (All (_ !) (-> (Monad !) (System !) Path Path (! (Try Any))))
+ (do (try.with monad)
+ [data (at fs read from)]
+ (at fs write to data)))
diff --git a/stdlib/source/library/lux/world/shell.lux b/stdlib/source/library/lux/world/shell.lux
index bd7829907..4101cb3c9 100644
--- a/stdlib/source/library/lux/world/shell.lux
+++ b/stdlib/source/library/lux/world/shell.lux
@@ -82,7 +82,8 @@
(type .public (Shell !)
(Interface
- (is (-> [Environment Path Command (List Argument)] (! (Try (Process !))))
+ (is (-> [Environment Path Command (List Argument)]
+ (! (Try (Process !))))
execute)))
(def .public (async shell)