aboutsummaryrefslogtreecommitdiff
path: root/lux-js/source
diff options
context:
space:
mode:
authorEduardo Julian2022-03-15 22:45:49 -0400
committerEduardo Julian2022-03-15 22:45:49 -0400
commitb0093a3849baaeb5e12692b2cf6ac65ba74bbd54 (patch)
tree26db4a468c2f75c64ba16e8b7dbf20f135d369fc /lux-js/source
parentbc36487224f670c23002cc4575c0dba3e5dc1be1 (diff)
Leaner syntax for library/lux/control/exception.report
Diffstat (limited to 'lux-js/source')
-rw-r--r--lux-js/source/program.lux28
1 files changed, 14 insertions, 14 deletions
diff --git a/lux-js/source/program.lux b/lux-js/source/program.lux
index b6c278de6..7a27e7172 100644
--- a/lux-js/source/program.lux
+++ b/lux-js/source/program.lux
@@ -155,8 +155,8 @@
(exception: (unknown_member [member Text
object java/lang/Object])
(exception.report
- ["Member" member]
- ["Object" (debug.inspection object)]))
+ "Member" member
+ "Object" (debug.inspection object)))
(def: jvm_int
(-> (I64 Any) java/lang/Integer)
@@ -311,17 +311,17 @@
(exception: (unknown_kind_of_host_object [object java/lang/Object])
(exception.report
- ["Class" (ffi.of_string (java/lang/Object::toString (java/lang/Object::getClass object)))]
- ["Object" (ffi.of_string (java/lang/Object::toString object))]
- ["Keys" (case (ffi.check org/openjdk/nashorn/api/scripting/ScriptObjectMirror object)
- {.#Some object}
- (|> object
- (org/openjdk/nashorn/api/scripting/ScriptObjectMirror::getOwnKeys true)
- (array.list {.#None})
- (%.list (|>> ffi.of_string %.text)))
-
- {.#None}
- "???")]))
+ "Class" (ffi.of_string (java/lang/Object::toString (java/lang/Object::getClass object)))
+ "Object" (ffi.of_string (java/lang/Object::toString object))
+ "Keys" (case (ffi.check org/openjdk/nashorn/api/scripting/ScriptObjectMirror object)
+ {.#Some object}
+ (|> object
+ (org/openjdk/nashorn/api/scripting/ScriptObjectMirror::getOwnKeys true)
+ (array.list {.#None})
+ (%.list (|>> ffi.of_string %.text)))
+
+ {.#None}
+ "???")))
(def: (i32 half i64)
(-> Text org/openjdk/nashorn/api/scripting/ScriptObjectMirror (Maybe Int))
@@ -475,7 +475,7 @@
(exception: (cannot_apply_a_non_function [object java/lang/Object])
(exception.report
- ["Object" (ffi.of_string (java/lang/Object::toString object))]))
+ "Object" (ffi.of_string (java/lang/Object::toString object))))
(def: (expander macro inputs lux)
Expander