aboutsummaryrefslogtreecommitdiff
path: root/lux-r
diff options
context:
space:
mode:
Diffstat (limited to 'lux-r')
-rw-r--r--lux-r/source/luxc/lang/synthesis/variable.lux8
-rw-r--r--lux-r/source/program.lux6
2 files changed, 8 insertions, 6 deletions
diff --git a/lux-r/source/luxc/lang/synthesis/variable.lux b/lux-r/source/luxc/lang/synthesis/variable.lux
index 932cb3dcb..f747a82df 100644
--- a/lux-r/source/luxc/lang/synthesis/variable.lux
+++ b/lux-r/source/luxc/lang/synthesis/variable.lux
@@ -46,11 +46,11 @@
(def: (unused-vars current-arity bound exprS)
(-> ls.Arity (List Variable) ls.Synthesis (List Variable))
(let [tracker (loop [exprS exprS
- tracker (list/fold s.add init-tracker bound)]
+ tracker (list/fold s.has init-tracker bound)]
(case exprS
(#ls.Variable var)
(if (non-arg? current-arity var)
- (s.remove var tracker)
+ (s.lacks var tracker)
tracker)
(#ls.Variant tag last? memberS)
@@ -76,13 +76,13 @@
(recur bodyS (list/fold recur tracker initsS))
(#ls.Case inputS outputPS)
- (let [tracker' (list/fold s.add
+ (let [tracker' (list/fold s.has
(recur inputS tracker)
(bound-vars outputPS))]
(list/fold recur tracker' (path-bodies outputPS)))
(#ls.Function arity env bodyS)
- (list/fold s.remove tracker env)
+ (list/fold s.lacks tracker env)
_
tracker
diff --git a/lux-r/source/program.lux b/lux-r/source/program.lux
index 245883eb4..de859ba50 100644
--- a/lux-r/source/program.lux
+++ b/lux-r/source/program.lux
@@ -12,7 +12,9 @@
["." exception (#+ exception:)]
["." io (#+ IO io)]
[concurrency
- ["." promise (#+ Promise)]]]
+ ["." promise (#+ Promise)]]
+ [parser
+ ["<.>" code]]]
[data
["." text ("#\." hash)
["%" format (#+ format)]
@@ -176,7 +178,7 @@
... (|>> (case> #0 (org/armedbear/lisp/Nil::NIL)
... #1 (org/armedbear/lisp/Symbol::T))))
-(syntax: (%%code term)
+(syntax: (%%code [term <code>.any])
(wrap (list (code.text (%.code term)))))
(def: (host_value value)