diff options
Diffstat (limited to '')
-rw-r--r-- | stdlib/source/lux/host.js.lux | 29 |
1 files changed, 15 insertions, 14 deletions
diff --git a/stdlib/source/lux/host.js.lux b/stdlib/source/lux/host.js.lux index 2935f9e16..8bfe8cc94 100644 --- a/stdlib/source/lux/host.js.lux +++ b/stdlib/source/lux/host.js.lux @@ -21,13 +21,16 @@ ["." code] ["." template]]]) -(abstract: #export (Object brand) Any) +(abstract: #export (Object brand) + Any) (template [<name>] [(with_expansions [<brand> (template.identifier [<name> "'"])] - (abstract: #export <brand> Any) - (type: #export <name> - (Object <brand>)))] + (abstract: <brand> + Any + + (type: #export <name> + (Object <brand>))))] [Function] [Symbol] @@ -148,16 +151,14 @@ (def: (without_null g!temp [nullable? outputT] output) (-> Code Nullable Code Code) (if nullable? - (` (: (Maybe (~ outputT)) - (let [(~ g!temp) (~ output)] - (if ("js object null?" (~ g!temp)) - #.None - (#.Some (~ g!temp)))))) - (` (: (~ outputT) - (let [(~ g!temp) (~ output)] - (if ("js object null?" (~ g!temp)) - (.error "Null is an invalid value.") - (~ g!temp))))))) + (` (let [(~ g!temp) (~ output)] + (if ("js object null?" (~ g!temp)) + #.None + (#.Some (~ g!temp))))) + (` (let [(~ g!temp) (~ output)] + (if (not ("js object null?" (~ g!temp))) + (~ g!temp) + (.error! "Null is an invalid value.")))))) (type: Import (#Class [Text (List Member)]) |