diff options
Diffstat (limited to 'stdlib/source/lux/host.js.lux')
-rw-r--r-- | stdlib/source/lux/host.js.lux | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/stdlib/source/lux/host.js.lux b/stdlib/source/lux/host.js.lux index 7ad985f1a..876ab0c38 100644 --- a/stdlib/source/lux/host.js.lux +++ b/stdlib/source/lux/host.js.lux @@ -40,8 +40,8 @@ {#.doc (doc "A way to get fields from objects." (get "ceil" (ref "Math")) (get "ceil" (-> Frac Frac) (ref "Math")))} - (wrap (list (` (:! (~ type) - ("js get-field" (~ object) (~ field-name))))))) + (wrap (list (` (:coerce (~ type) + ("js get-field" (~ object) (~ field-name))))))) (syntax: #export (object {kvs (p.some (p.seq s.any s.any))}) {#.doc (doc "A way to create JavaScript objects." @@ -57,8 +57,8 @@ {#.doc (doc "A way to refer to JavaScript variables." (ref "document") (ref "Math.ceil" (-> Frac Frac)))} - (wrap (list (` (:! (~ (default (' ..Object) type)) - ("js ref" (~ (code.text name)))))))) + (wrap (list (` (:coerce (~ (default (' ..Object) type)) + ("js ref" (~ (code.text name)))))))) (do-template [<name> <proc> <doc>] [(syntax: #export (<name>) @@ -77,9 +77,9 @@ (call! (ref "Math") "ceil" [123.45]))} (case shape (#.Left [function args ?type]) - (wrap (list (` (:! (~ (default (' ..Object) ?type)) - ("js call" (~ function) (~+ args)))))) + (wrap (list (` (:coerce (~ (default (' ..Object) ?type)) + ("js call" (~ function) (~+ args)))))) (#.Right [object field args ?type]) - (wrap (list (` (:! (~ (default (' ..Object) ?type)) - ("js object-call" (~ object) (~ (code.text field)) (~+ args)))))))) + (wrap (list (` (:coerce (~ (default (' ..Object) ?type)) + ("js object-call" (~ object) (~ (code.text field)) (~+ args)))))))) |