aboutsummaryrefslogtreecommitdiff
path: root/lux-jvm/source/luxc/lang/translation/jvm/extension
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--lux-jvm/source/luxc/lang/translation/jvm/extension/host.lux16
1 files changed, 10 insertions, 6 deletions
diff --git a/lux-jvm/source/luxc/lang/translation/jvm/extension/host.lux b/lux-jvm/source/luxc/lang/translation/jvm/extension/host.lux
index 7b90a8e4f..482521e34 100644
--- a/lux-jvm/source/luxc/lang/translation/jvm/extension/host.lux
+++ b/lux-jvm/source/luxc/lang/translation/jvm/extension/host.lux
@@ -30,8 +30,9 @@
["." parser]]]]
[tool
[compiler
- ["." reference (#+ Variable)]
["." phase ("#@." monad)]
+ [reference (#+)
+ ["." variable (#+ Variable)]]
[meta
[archive (#+ Archive)]]
[language
@@ -864,6 +865,9 @@
(^ (synthesis.branch/if [testS thenS elseS]))
(synthesis.branch/if [(recur testS) (recur thenS) (recur elseS)])
+ (^ (synthesis.branch/get [path recordS]))
+ (synthesis.branch/get [path (recur recordS)])
+
(^ (synthesis.loop/scope [offset initsS+ bodyS]))
(synthesis.loop/scope [offset (list@map recur initsS+) (recur bodyS)])
@@ -969,14 +973,14 @@
## Combine them.
list@join
## Remove duplicates.
- (set.from-list reference.hash)
+ (set.from-list variable.hash)
set.to-list)
global-mapping (|> total-environment
## Give them names as "foreign" variables.
list.enumerate
(list@map (function (_ [id capture])
- [capture (#reference.Foreign id)]))
- (dictionary.from-list reference.hash))
+ [capture (#variable.Foreign id)]))
+ (dictionary.from-list variable.hash))
normalized-methods (list@map (function (_ [environment
[ownerT name
strict-fp? annotations vars
@@ -985,11 +989,11 @@
(let [local-mapping (|> environment
list.enumerate
(list@map (function (_ [foreign-id capture])
- [(#reference.Foreign foreign-id)
+ [(#variable.Foreign foreign-id)
(|> global-mapping
(dictionary.get capture)
maybe.assume)]))
- (dictionary.from-list reference.hash))]
+ (dictionary.from-list variable.hash))]
[ownerT name
strict-fp? annotations vars
self-name arguments returnT exceptionsT