aboutsummaryrefslogtreecommitdiff
path: root/stdlib/source/library/lux/ffi.lux
diff options
context:
space:
mode:
Diffstat (limited to 'stdlib/source/library/lux/ffi.lux')
-rw-r--r--stdlib/source/library/lux/ffi.lux72
1 files changed, 36 insertions, 36 deletions
diff --git a/stdlib/source/library/lux/ffi.lux b/stdlib/source/library/lux/ffi.lux
index 17b150560..575809639 100644
--- a/stdlib/source/library/lux/ffi.lux
+++ b/stdlib/source/library/lux/ffi.lux
@@ -57,9 +57,9 @@
{try.#Success <inputs>}
<body>)))))]))
-(def generation
+(def translation
(template (_ <name> <bindings> <inputs> <body>)
- [("lux def generation" <name>
+ [("lux def translation" <name>
(.function (_ name phase archive inputs)
(.function (_ state)
(let [<bindings> [name phase archive state]]
@@ -80,10 +80,10 @@
_
{try.#Success [state (extension_analysis name (list))]})
- (generation <undefined>
- [name phase archive state]
- (list)
- {try.#Success [state js.undefined]})
+ (translation <undefined>
+ [name phase archive state]
+ (list)
+ {try.#Success [state js.undefined]})
(def .public undefined
(template (undefined)
@@ -97,12 +97,12 @@
[[state it] (phase archive (` (.is .Any (, it))) state)]
(in [state (extension_analysis name (list it))])))
- (generation <undefined?>
- [name phase archive state]
- (list it)
- (do try.monad
- [[state it] (phase archive it state)]
- (in [state (js.= js.undefined it)])))
+ (translation <undefined?>
+ [name phase archive state]
+ (list it)
+ (do try.monad
+ [[state it] (phase archive it state)]
+ (in [state (js.= js.undefined it)])))
(def .public undefined?
(template (undefined? <it>)
@@ -137,23 +137,23 @@
_
(.undefined)))
- (generation <object>
- [name phase archive state]
- (list.partial head_key head_value tail)
- (do [! try.monad]
- [[state output] (monad.mix !
- (.function (_ [key value] [state output])
- (when key
- (text_synthesis key)
- (do try.monad
- [[state value] (phase archive value state)]
- (in [state (list.partial [key value] output)]))
-
- _
- (.undefined)))
- [state (list)]
- (pairs (list.partial head_key head_value tail)))]
- (in [state (js.object (list.reversed output))])))
+ (translation <object>
+ [name phase archive state]
+ (list.partial head_key head_value tail)
+ (do [! try.monad]
+ [[state output] (monad.mix !
+ (.function (_ [key value] [state output])
+ (when key
+ (text_synthesis key)
+ (do try.monad
+ [[state value] (phase archive value state)]
+ (in [state (list.partial [key value] output)]))
+
+ _
+ (.undefined)))
+ [state (list)]
+ (pairs (list.partial head_key head_value tail)))]
+ (in [state (js.object (list.reversed output))])))
(def .public object
(syntax (_ [it (<>.some <code>.any)])
@@ -169,13 +169,13 @@
[state object] (phase archive (` (.is (..Object .Any) (, object))) state)]
(in [state (extension_analysis name (list (text_analysis field) value object))])))
- (generation <set>
- [name phase archive state]
- (list (text_synthesis field) value object)
- (do try.monad
- [[state value] (phase archive value state)
- [state object] (phase archive object state)]
- (in [state (js.set (js.the field object) value)])))
+ (translation <set>
+ [name phase archive state]
+ (list (text_synthesis field) value object)
+ (do try.monad
+ [[state value] (phase archive value state)
+ [state object] (phase archive object state)]
+ (in [state (js.set (js.the field object) value)])))
(def .public set
(syntax (_ [field <code>.any