aboutsummaryrefslogtreecommitdiff
path: root/stdlib/source/library/lux/world/program.lux
diff options
context:
space:
mode:
Diffstat (limited to 'stdlib/source/library/lux/world/program.lux')
-rw-r--r--stdlib/source/library/lux/world/program.lux12
1 files changed, 6 insertions, 6 deletions
diff --git a/stdlib/source/library/lux/world/program.lux b/stdlib/source/library/lux/world/program.lux
index 3216c6b93..ea1ecc83b 100644
--- a/stdlib/source/library/lux/world/program.lux
+++ b/stdlib/source/library/lux/world/program.lux
@@ -8,6 +8,7 @@
[control
["." function]
["." io (#+ IO)]
+ ["." maybe]
["." try (#+ Try)]
["." exception (#+ exception:)]
[concurrency
@@ -17,7 +18,6 @@
["." environment (#+ Environment)]]]
[data
["." bit ("#\." equivalence)]
- ["." maybe]
["." text
["%" format (#+ format)]]
[collection
@@ -105,8 +105,8 @@
home)
(def: directory
directory)
- (def: (exit code)
- (io.io (error! (%.int code)))))))
+ (def: exit
+ (|>> %.int panic! io.io)))))
... Do not trust the values of environment variables
... https://wiki.sei.cmu.edu/confluence/display/java/ENV02-J.+Do+not+trust+the+values+of+environment+variables
@@ -144,7 +144,7 @@
@.jvm (as_is <jvm>)
@.js (as_is (def: default_exit!
(-> Exit (IO Nothing))
- (|>> %.int error! io.io))
+ (|>> %.int panic! io.io))
(import: NodeJs_Process
["#::."
@@ -376,7 +376,7 @@
}))))
(def: home
- (io.run
+ (io.run!
(with_expansions [<default> (io.io "~")
<jvm> (io.io (maybe.else "" (java/lang/System::getProperty "user.home")))]
(for {@.old <jvm>
@@ -399,7 +399,7 @@
<default>))))
(def: directory
- (io.run
+ (io.run!
(with_expansions [<default> "."
<jvm> (io.io (maybe.else "" (java/lang/System::getProperty "user.dir")))]
(for {@.old <jvm>