From 772f621c19408c711c1e587668a52a8cfeeea418 Mon Sep 17 00:00:00 2001 From: Eduardo Julian Date: Fri, 12 Aug 2022 22:26:57 -0400 Subject: Fixes for Aedifex tests. --- stdlib/source/library/lux/data/collection/list.lux | 2 +- stdlib/source/library/lux/world/file.lux | 6 ++++++ stdlib/source/library/lux/world/shell.lux | 3 ++- 3 files changed, 9 insertions(+), 2 deletions(-) (limited to 'stdlib/source/library') 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 @@ )))] [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) -- cgit v1.2.3