diff options
Diffstat (limited to '')
-rw-r--r-- | stdlib/source/lux/world/file.lux | 34 |
1 files changed, 17 insertions, 17 deletions
diff --git a/stdlib/source/lux/world/file.lux b/stdlib/source/lux/world/file.lux index c21d20d80..5f1bbc6a8 100644 --- a/stdlib/source/lux/world/file.lux +++ b/stdlib/source/lux/world/file.lux @@ -368,15 +368,15 @@ [(def: <name> (..can-query (function (<name> _) - (do {@ (try.with io.monad)} + (do {! (try.with io.monad)} [?children (java/io/File::listFiles (java/io/File::new path))] (case ?children (#.Some children) (|> children array.to-list - (monad.filter @ (|>> <method>)) - (:: @ map (monad.map @ (|>> java/io/File::getAbsolutePath (:: @ map <capability>)))) - (:: @ join)) + (monad.filter ! (|>> <method>)) + (:: ! map (monad.map ! (|>> java/io/File::getAbsolutePath (:: ! map <capability>)))) + (:: ! join)) #.None (:: io.monad wrap (exception.throw ..not-a-directory [path])))))))] @@ -575,11 +575,11 @@ [(def: <name> (..can-query (function (<name> _) - (do {@ (try.with io.monad)} + (do {! (try.with io.monad)} [#let [node-fs (..node-fs [])] subs (Fs::readdirSync [path] node-fs) - subs (monad.map @ (function (_ sub) - (do @ + subs (monad.map ! (function (_ sub) + (do ! [stats (Fs::statSync [sub] node-fs) verdict (<method> [] stats)] (wrap [verdict sub]))) @@ -805,11 +805,11 @@ (def: (try-update! transform var) (All [a] (-> (-> a (Try a)) (Var a) (STM (Try Any)))) - (do {@ stm.monad} + (do {! stm.monad} [|var| (stm.read var)] (case (transform |var|) (#try.Success |var|) - (do @ + (do ! [_ (stm.write |var| var)] (wrap (#try.Success []))) @@ -911,7 +911,7 @@ (..can-open (function (_ path) (stm.commit - (do {@ stm.monad} + (do {! stm.monad} [|store| (stm.read store)] (case (do try.monad [[name file] (..retrieve-mock-file! separator path |store|) @@ -920,7 +920,7 @@ |store| (..update-mock-file! separator path (get@ #mock-last-modified file) (get@ #mock-content file) |store|)] (wrap [|store| (mock-file separator name path store)])) (#try.Success [|store| moved]) - (do @ + (do ! [_ (stm.write |store| store)] (wrap (#try.Success moved))) @@ -1056,11 +1056,11 @@ (..can-delete (function (_ _) (stm.commit - (do {@ stm.monad} + (do {! stm.monad} [|store| (stm.read store)] (case (..delete-mock-directory! separator path |store|) (#try.Success |store|) - (do @ + (do ! [_ (stm.write |store| store)] (wrap (#try.Success []))) @@ -1090,11 +1090,11 @@ (do promise.monad [now (promise.future instant.now)] (stm.commit - (do {@ stm.monad} + (do {! stm.monad} [|store| (stm.read store)] (case (..create-mock-file! separator path now |store|) (#try.Success [name |store|]) - (do @ + (do ! [_ (stm.write |store| store)] (wrap (#try.Success (..mock-file separator name path store)))) @@ -1115,11 +1115,11 @@ (..can-open (function (_ path) (stm.commit - (do {@ stm.monad} + (do {! stm.monad} [|store| (stm.read store)] (case (..create-mock-directory! separator path |store|) (#try.Success _) - (do @ + (do ! [_ (stm.write |store| store)] (wrap (#try.Success (..mock-directory separator path store)))) |