aboutsummaryrefslogtreecommitdiff
path: root/stdlib/source/library/lux/world/shell.lux
diff options
context:
space:
mode:
authorEduardo Julian2021-09-05 22:52:26 -0400
committerEduardo Julian2021-09-05 22:52:26 -0400
commit132ffdae1add622c8a3c6065d7730a8fe8ea5e78 (patch)
tree540310f190007d192b892db2d0a520d17b73ad48 /stdlib/source/library/lux/world/shell.lux
parent09e2747bf8c6dcdc1d7318f2490f0de37d77b39f (diff)
Changed the syntax of do/be's (co)monad bindings.
Diffstat (limited to '')
-rw-r--r--stdlib/source/library/lux/world/shell.lux10
1 files changed, 5 insertions, 5 deletions
diff --git a/stdlib/source/library/lux/world/shell.lux b/stdlib/source/library/lux/world/shell.lux
index 186d241d4..927412def 100644
--- a/stdlib/source/library/lux/world/shell.lux
+++ b/stdlib/source/library/lux/world/shell.lux
@@ -232,7 +232,7 @@
(def: (default_process process)
(-> java/lang/Process (IO (Try (Process IO))))
- (do {! (try.with io.monad)}
+ (do [! (try.with io.monad)]
[jvm_input (java/lang/Process::getInputStream process)
jvm_error (java/lang/Process::getErrorStream process)
jvm_output (java/lang/Process::getOutputStream process)
@@ -294,7 +294,7 @@
(Shell IO)
(def: (execute [environment working_directory command arguments])
- (do {! (try.with io.monad)}
+ (do [! (try.with io.monad)]
[.let [builder (|> (list& command arguments)
..jvm::arguments_array
java/lang/ProcessBuilder::new
@@ -328,7 +328,7 @@
(~~ (template [<name> <mock>]
[(def: (<name> _)
- (do {! io.monad}
+ (do [! io.monad]
[|state| (atom.read! state)]
(case (\ mock <mock> |state|)
(#try.Success [|state| output])
@@ -344,7 +344,7 @@
[await on_await]
))
(def: (write message)
- (do {! io.monad}
+ (do [! io.monad]
[|state| (atom.read! state)]
(case (\ mock on_write message |state|)
(#try.Success |state|)
@@ -355,7 +355,7 @@
(#try.Failure error)
(in (#try.Failure error)))))
(def: (destroy _)
- (do {! io.monad}
+ (do [! io.monad]
[|state| (atom.read! state)]
(case (\ mock on_destroy |state|)
(#try.Success |state|)