aboutsummaryrefslogtreecommitdiff
path: root/stdlib/source/library/lux/world/shell.lux
diff options
context:
space:
mode:
authorEduardo Julian2022-06-04 19:34:42 -0400
committerEduardo Julian2022-06-04 19:34:42 -0400
commitf9e33ae96aec4741385a576719786092c9e68043 (patch)
tree140057dfc054346eab721f9905f0f0fff22ad933 /stdlib/source/library/lux/world/shell.lux
parent56d2835d35093e2d92c5e8a4371aa322b55e037b (diff)
De-sigil-ification: #
Diffstat (limited to '')
-rw-r--r--stdlib/source/library/lux/world/shell.lux28
1 files changed, 14 insertions, 14 deletions
diff --git a/stdlib/source/library/lux/world/shell.lux b/stdlib/source/library/lux/world/shell.lux
index e52d4e0f3..4493832ae 100644
--- a/stdlib/source/library/lux/world/shell.lux
+++ b/stdlib/source/library/lux/world/shell.lux
@@ -63,7 +63,7 @@
(`` (implementation
(~~ (template [<method>]
[(def: <method>
- (|>> (# process <method>)
+ (|>> (at process <method>)
async.future))]
[read]
@@ -90,7 +90,7 @@
(def: (execute input)
(async.future
(do (try.with io.monad)
- [process (# shell execute input)]
+ [process (at shell execute input)]
(in (..async_process process)))))))
... https://en.wikipedia.org/wiki/Code_injection#Shell_injection
@@ -254,19 +254,19 @@
(in (ffi.of_string output))
{.#None}
- (# io.monad in (exception.except ..no_more_output [])))))]
+ (at io.monad in (exception.except ..no_more_output [])))))]
[read jvm_input]
[fail jvm_error]
))
(def: (write message)
- (java/io/OutputStream::write (# utf8.codec encoded message) jvm_output))
+ (java/io/OutputStream::write (at utf8.codec encoded message) jvm_output))
(~~ (template [<name> <method>]
[(def: (<name> _)
(|> process <method>))]
[destroy java/lang/Process::destroy]
- [await (<| (# ! each (|>> ffi.of_int)) java/lang/Process::waitFor)]
+ [await (<| (at ! each (|>> ffi.of_int)) java/lang/Process::waitFor)]
))))))))
(import: java/io/File
@@ -287,9 +287,9 @@
... https://en.wikipedia.org/wiki/Code_injection#Shell_injection
(def: windows?
(IO (Try Bit))
- (# (try.with io.monad) each
- (|>> java/lang/String::toLowerCase ffi.of_string (text.starts_with? "windows"))
- (java/lang/System::getProperty (ffi.as_string "os.name"))))
+ (at (try.with io.monad) each
+ (|>> java/lang/String::toLowerCase ffi.of_string (text.starts_with? "windows"))
+ (java/lang/System::getProperty (ffi.as_string "os.name"))))
(implementation: .public default
(Shell IO)
@@ -302,8 +302,8 @@
(java/lang/ProcessBuilder::directory (java/io/File::new (ffi.as_string working_directory))))]
_ (|> builder
java/lang/ProcessBuilder::environment
- (# try.functor each (..jvm::load_environment environment))
- (# io.monad in))
+ (at try.functor each (..jvm::load_environment environment))
+ (at io.monad in))
process (java/lang/ProcessBuilder::start builder)]
(..default_process process))))
)]
@@ -331,7 +331,7 @@
[(def: (<name> _)
(do [! io.monad]
[|state| (atom.read! state)]
- (case (# mock <mock> |state|)
+ (case (at mock <mock> |state|)
{try.#Success [|state| output]}
(do !
[_ (atom.write! |state| state)]
@@ -347,7 +347,7 @@
(def: (write message)
(do [! io.monad]
[|state| (atom.read! state)]
- (case (# mock on_write message |state|)
+ (case (at mock on_write message |state|)
{try.#Success |state|}
(do !
[_ (atom.write! |state| state)]
@@ -358,7 +358,7 @@
(def: (destroy _)
(do [! io.monad]
[|state| (atom.read! state)]
- (case (# mock on_destroy |state|)
+ (case (at mock on_destroy |state|)
{try.#Success |state|}
(do !
[_ (atom.write! |state| state)]
@@ -376,5 +376,5 @@
(def: execute
(|>> mock
- (# try.monad each (..mock_process (atom.atom init)))
+ (at try.monad each (..mock_process (atom.atom init)))
io.io)))