diff options
author | Eduardo Julian | 2021-09-05 22:52:26 -0400 |
---|---|---|
committer | Eduardo Julian | 2021-09-05 22:52:26 -0400 |
commit | 132ffdae1add622c8a3c6065d7730a8fe8ea5e78 (patch) | |
tree | 540310f190007d192b892db2d0a520d17b73ad48 /stdlib/source/specification/lux/world/file.lux | |
parent | 09e2747bf8c6dcdc1d7318f2490f0de37d77b39f (diff) |
Changed the syntax of do/be's (co)monad bindings.
Diffstat (limited to 'stdlib/source/specification/lux/world/file.lux')
-rw-r--r-- | stdlib/source/specification/lux/world/file.lux | 24 |
1 files changed, 12 insertions, 12 deletions
diff --git a/stdlib/source/specification/lux/world/file.lux b/stdlib/source/specification/lux/world/file.lux index 14cb79211..765893ba6 100644 --- a/stdlib/source/specification/lux/world/file.lux +++ b/stdlib/source/specification/lux/world/file.lux @@ -34,7 +34,7 @@ (def: (for_path fs) (-> (IO (/.System Async)) Test) (<| (_.for [/.Path]) - (do {! random.monad} + (do [! random.monad] [parent (random.ascii/numeric 2) child (random.ascii/numeric 2)]) in @@ -89,7 +89,7 @@ post_file_size (\ fs file_size path) post_content (\ fs read path)] (in (<| (try.else false) - (do {! try.monad} + (do [! try.monad] [pre_file_size! (\ ! each (n.= expected_file_size) pre_file_size) @@ -114,7 +114,7 @@ [modified? (\ fs modify expected_time path) last_modified (\ fs last_modified path)] (in (<| (try.else false) - (do {! try.monad} + (do [! try.monad] [_ modified?] (\ ! each (instant\= expected_time) last_modified)))))) @@ -141,7 +141,7 @@ (-> (/.System Async) /.Path Text Text (Async Bit)) (let [origin (/.rooted fs parent child) destination (/.rooted fs parent alternate_child)] - (do {! async.monad} + (do [! async.monad] [moved? (\ fs move destination origin) lost? (|> origin (\ fs file?) @@ -157,7 +157,7 @@ (def: (for_system fs) (-> (IO (/.System Async)) Test) - (<| (do {! random.monad} + (<| (do [! random.monad] [parent (random.ascii/numeric 2) child (random.ascii/numeric 2) sub_dir (random.only (|>> (text\= child) not) @@ -171,7 +171,7 @@ appendix ($binary.random expected_file_size) expected_time random.instant]) in - (do {! async.monad} + (do [! async.monad] [fs (async.future fs) .let [path (/.rooted fs parent child)] @@ -208,12 +208,12 @@ (def: (make_directories&cannot_make_directory fs) (-> (IO (/.System Async)) Test) - (<| (do {! random.monad} + (<| (do [! random.monad] [dir/0 (random.ascii/numeric 2) dir/1 (random.ascii/numeric 2) dir/2 (random.ascii/numeric 2)]) in - (do {! async.monad} + (do [! async.monad] [fs (async.future fs) .let [dir/1 (/.rooted fs dir/0 dir/1) dir/2 (/.rooted fs dir/1 dir/2)] @@ -255,10 +255,10 @@ (def: (make_file&cannot_make_file fs) (-> (IO (/.System Async)) Test) - (<| (do {! random.monad} + (<| (do [! random.monad] [file/0 (random.ascii/numeric 3)]) in - (do {! async.monad} + (do [! async.monad] [fs (async.future fs) make_file!/0 (/.make_file ! fs (utf8\encoded file/0) file/0) make_file!/1 (/.make_file ! fs (utf8\encoded file/0) file/0)]) @@ -285,12 +285,12 @@ (def: (exists? fs) (-> (IO (/.System Async)) Test) - (<| (do {! random.monad} + (<| (do [! random.monad] [file (random.ascii/numeric 2) dir (random.only (|>> (text\= file) not) (random.ascii/numeric 2))]) in - (do {! async.monad} + (do [! async.monad] [fs (async.future fs) pre_file/0 (\ fs file? file) |