aboutsummaryrefslogtreecommitdiff
path: root/new-luxc/test
diff options
context:
space:
mode:
authorEduardo Julian2017-07-02 16:06:34 -0400
committerEduardo Julian2017-07-02 16:06:34 -0400
commita7cb1e8d06e62c710c3cdfc4b225e8b4a8c26205 (patch)
tree3efe23ad55525a502f0a59ae9d372dd4bd175db5 /new-luxc/test
parentd28c16939e02dbd7e3a2d987bc88135285938f2f (diff)
- Renamed "#Relative" to "#Variable" and "#Absolute" to "#Definition".
Diffstat (limited to 'new-luxc/test')
-rw-r--r--new-luxc/test/test/luxc/analyser/reference.lux8
-rw-r--r--new-luxc/test/test/luxc/synthesizer/case/special.lux2
-rw-r--r--new-luxc/test/test/luxc/synthesizer/function.lux4
-rw-r--r--new-luxc/test/test/luxc/synthesizer/loop.lux6
4 files changed, 10 insertions, 10 deletions
diff --git a/new-luxc/test/test/luxc/analyser/reference.lux b/new-luxc/test/test/luxc/analyser/reference.lux
index 33d93e415..9d22088b5 100644
--- a/new-luxc/test/test/luxc/analyser/reference.lux
+++ b/new-luxc/test/test/luxc/analyser/reference.lux
@@ -23,18 +23,18 @@
scope-name (r;text +5)
var-name (r;text +5)]
($_ seq
- (test "Can analyse relative reference."
+ (test "Can analyse variable."
(|> (&env;with-scope scope-name
(&env;with-local [var-name ref-type]
(@common;with-unknown-type
(@;analyse-reference ["" var-name]))))
(macro;run (init-compiler []))
- (case> (#R;Success [_type (#~;Relative idx)])
+ (case> (#R;Success [_type (#~;Variable idx)])
(Type/= ref-type _type)
_
false)))
- (test "Can analyse absolute reference."
+ (test "Can analyse definition."
(|> (do Monad<Lux>
[_ (&module;create +0 module-name)
_ (&module;define [module-name var-name]
@@ -42,7 +42,7 @@
(@common;with-unknown-type
(@;analyse-reference [module-name var-name])))
(macro;run (init-compiler []))
- (case> (#R;Success [_type (#~;Absolute idx)])
+ (case> (#R;Success [_type (#~;Definition idx)])
(Type/= ref-type _type)
_
diff --git a/new-luxc/test/test/luxc/synthesizer/case/special.lux b/new-luxc/test/test/luxc/synthesizer/case/special.lux
index fe5ad20ac..cf2ab9372 100644
--- a/new-luxc/test/test/luxc/synthesizer/case/special.lux
+++ b/new-luxc/test/test/luxc/synthesizer/case/special.lux
@@ -21,7 +21,7 @@
temp r;nat
#let [maskA (#la;Case maskedA
(list [(#la;BindP temp)
- (#la;Relative (#;Local temp))]))]]
+ (#la;Variable (#;Local temp))]))]]
(test "Dummy variables created to mask expressions get eliminated during synthesis."
(|> (synthesizer;synthesize maskA)
(corresponds? maskedA))))
diff --git a/new-luxc/test/test/luxc/synthesizer/function.lux b/new-luxc/test/test/luxc/synthesizer/function.lux
index acc39ce16..c9d3befee 100644
--- a/new-luxc/test/test/luxc/synthesizer/function.lux
+++ b/new-luxc/test/test/luxc/synthesizer/function.lux
@@ -85,7 +85,7 @@
[chosen (pick (list;size global-env))]
(wrap [num-args
(assume (D;get chosen resolver))
- (#la;Relative (#;Captured chosen))])))))))]
+ (#la;Variable (#;Captured chosen))])))))))]
(wrap [total-args prediction (#la;Function (make-scope absolute-env) bodyA)])
))
@@ -102,7 +102,7 @@
[chosen (|> r;nat (:: @ map (|>. (n.% +100) (n.max +2))))]
(wrap [num-args
(|> chosen (n.+ (n.dec num-args)) nat-to-int)
- (#la;Relative (#;Local chosen))])))))
+ (#la;Variable (#;Local chosen))])))))
(context: "Function definition."
[[args1 prediction1 function1] gen-function//constant
diff --git a/new-luxc/test/test/luxc/synthesizer/loop.lux b/new-luxc/test/test/luxc/synthesizer/loop.lux
index abc06dbb8..386f14cfa 100644
--- a/new-luxc/test/test/luxc/synthesizer/loop.lux
+++ b/new-luxc/test/test/luxc/synthesizer/loop.lux
@@ -103,13 +103,13 @@
[arity (|> r;nat (:: @ map (|>. (n.% +10) (n.max +1))))
recur? r;bool
outputS (if recur?
- (wrap (make-apply (#la;Relative (#;Local +0))
+ (wrap (make-apply (#la;Variable (#;Local +0))
(list;repeat arity #la;Unit)))
(do @
[plus-or-minus? r;bool
how-much (|> r;nat (:: @ map (|>. (n.% arity) (n.max +1))))
#let [shift (if plus-or-minus? n.+ n.-)]]
- (wrap (make-apply (#la;Relative (#;Local +0))
+ (wrap (make-apply (#la;Variable (#;Local +0))
(list;repeat (shift how-much arity) #la;Unit)))))
bodyS (gen-body arity outputS)]
(wrap [recur? arity (make-function arity bodyS)])))
@@ -120,7 +120,7 @@
[arity (|> r;nat (:: @ map (|>. (n.% +10) (n.max +1))))
recur? r;bool
self-ref? r;bool
- #let [selfA (#la;Relative (#;Local +0))
+ #let [selfA (#la;Variable (#;Local +0))
argA (if self-ref? selfA #la;Unit)]
outputS (if recur?
(wrap (make-apply selfA (list;repeat arity argA)))