aboutsummaryrefslogtreecommitdiff
path: root/stdlib/source/library/lux/world/file.lux
diff options
context:
space:
mode:
Diffstat (limited to 'stdlib/source/library/lux/world/file.lux')
-rw-r--r--stdlib/source/library/lux/world/file.lux54
1 files changed, 27 insertions, 27 deletions
diff --git a/stdlib/source/library/lux/world/file.lux b/stdlib/source/library/lux/world/file.lux
index 2c8db5ea3..c0c76d6de 100644
--- a/stdlib/source/library/lux/world/file.lux
+++ b/stdlib/source/library/lux/world/file.lux
@@ -696,11 +696,11 @@
(do [! (try.with io.monad)]
[self (Dir::open path)
children (Dir::children self)
- output (loop [input (|> children
- (array.list {.#None})
- (list#each (|>> (format path ..ruby_separator))))
- output (is (List ..Path)
- (list))]
+ output (loop (again [input (|> children
+ (array.list {.#None})
+ (list#each (|>> (format path ..ruby_separator))))
+ output (is (List ..Path)
+ (list))])
(case input
{.#End}
(in output)
@@ -813,7 +813,7 @@
... [(exception: .public (<name> [file Path])
... (exception.report
... "Path" file))]
- ...
+
... [cannot_write_to_file]
... )
@@ -889,13 +889,13 @@
... [(def: (<name> _)
... (do [! (try.with io.monad)]
... [children (..scandir [path])]
- ... (loop [input (|> children
- ... (array.list {.#None})
- ... (list.only (function (_ child)
- ... (not (or (text#= "." child)
- ... (text#= ".." child))))))
- ... output (is (List (<capability> IO))
- ... (list))]
+ ... (loop (again [input (|> children
+ ... (array.list {.#None})
+ ... (list.only (function (_ child)
+ ... (not (or (text#= "." child)
+ ... (text#= ".." child))))))
+ ... output (is (List (<capability> IO))
+ ... (list))])
... (case input
... {.#End}
... (in output)
@@ -982,8 +982,8 @@
(def: (retrieve_mock_file! separator path mock)
(-> Text Path Mock (Try [Text Mock_File]))
- (loop [directory mock
- trail (text.all_split_by separator path)]
+ (loop (again [directory mock
+ trail (text.all_split_by separator path)])
(case trail
{.#Item head tail}
(case (dictionary.value head directory)
@@ -1006,8 +1006,8 @@
(def: (update_mock_file! / path now content mock)
(-> Text Path Instant Binary Mock (Try Mock))
- (loop [directory mock
- trail (text.all_split_by / path)]
+ (loop (again [directory mock
+ trail (text.all_split_by / path)])
(case trail
{.#Item head tail}
(case (dictionary.value head directory)
@@ -1045,8 +1045,8 @@
(def: (delete_mock_node! / path mock)
(-> Text Path Mock (Try Mock))
- (loop [directory mock
- trail (text.all_split_by / path)]
+ (loop (again [directory mock
+ trail (text.all_split_by / path)])
(case trail
{.#Item head tail}
(case (dictionary.value head directory)
@@ -1093,8 +1093,8 @@
(def: (make_mock_directory! / path mock)
(-> Text Path Mock (Try Mock))
- (loop [directory mock
- trail (text.all_split_by / path)]
+ (loop (again [directory mock
+ trail (text.all_split_by / path)])
(case trail
{.#Item head tail}
(case (dictionary.value head directory)
@@ -1121,8 +1121,8 @@
(def: (retrieve_mock_directory! / path mock)
(-> Text Path Mock (Try Mock))
- (loop [directory mock
- trail (text.all_split_by / path)]
+ (loop (again [directory mock
+ trail (text.all_split_by / path)])
(case trail
{.#End}
{try.#Success directory}
@@ -1306,10 +1306,10 @@
{.#Item head tail}
(case head
"" (# monad in (exception.except ..cannot_make_directory [path]))
- _ (loop [current (if rooted?
- (format (# fs separator) head)
- head)
- next tail]
+ _ (loop (again [current (if rooted?
+ (format (# fs separator) head)
+ head)
+ next tail])
(do monad
[? (..check_or_make_directory monad fs current)]
(case ?