aboutsummaryrefslogtreecommitdiff
path: root/stdlib/source/lux/world/program.lux
diff options
context:
space:
mode:
Diffstat (limited to 'stdlib/source/lux/world/program.lux')
-rw-r--r--stdlib/source/lux/world/program.lux23
1 files changed, 11 insertions, 12 deletions
diff --git a/stdlib/source/lux/world/program.lux b/stdlib/source/lux/world/program.lux
index 205fbb7f8..92a5793bd 100644
--- a/stdlib/source/lux/world/program.lux
+++ b/stdlib/source/lux/world/program.lux
@@ -160,8 +160,8 @@
[#.None #.None]
(..default_exit! code)))
- (import: JS_Object
- (entries [] (Array (Array host.String))))
+ (import: Object
+ (#static entries [Object] (Array (Array host.String))))
(import: NodeJs_OS
(homedir [] #io Path))
@@ -177,17 +177,16 @@
(for {@.old <jvm>
@.jvm <jvm>
@.js (io.io (if host.on_node_js?
- (case (host.constant JS_Object [process env])
+ (case (host.constant Object [process env])
(#.Some process/env)
- (|> process/env
- (JS_Object::entries [])
- (array\fold (function (_ entry environment)
- (<| (maybe.default environment)
- (do maybe.monad
- [variable (array.read 0 entry)
- value (array.read 1 entry)]
- (wrap (dictionary.put variable value environment)))))
- environment.empty))
+ (array\fold (function (_ entry environment)
+ (<| (maybe.default environment)
+ (do maybe.monad
+ [variable (array.read 0 entry)
+ value (array.read 1 entry)]
+ (wrap (dictionary.put variable value environment)))))
+ environment.empty
+ (Object::entries [process/env]))
#.None
(undefined))