summaryrefslogtreecommitdiffstats
path: root/tests/011
diff options
context:
space:
mode:
authorKaz Kylheku <kaz@kylheku.com>2021-02-01 21:44:29 -0800
committerKaz Kylheku <kaz@kylheku.com>2021-02-01 21:44:29 -0800
commitf98f2a73750bff9b182c74d073a9c78e5316d7ae (patch)
tree007c8b8d4c06c75129e934818377b7827787cf9b /tests/011
parent6968ea83c5bfb11b725e3ab638a66ff2681ce6f6 (diff)
downloadtxr-f98f2a73750bff9b182c74d073a9c78e5316d7ae.tar.gz
txr-f98f2a73750bff9b182c74d073a9c78e5316d7ae.tar.bz2
txr-f98f2a73750bff9b182c74d073a9c78e5316d7ae.zip
matcher: rename @(let) to @(as).
* lisplib.c (match_instantiate): Ensure usr:as is interned. * share/txr/stdlib/match.tl (compile-let-match): Rename to compile-as-match. (compile-match): Remove handling of let symbol; route as symbol to compile-as-match. * tests/011/patmatch.tl: Update all uses of let to as. * txr.1: Updated.
Diffstat (limited to 'tests/011')
-rw-r--r--tests/011/patmatch.tl12
1 files changed, 6 insertions, 6 deletions
diff --git a/tests/011/patmatch.tl b/tests/011/patmatch.tl
index f5f658ab..f8f6b03f 100644
--- a/tests/011/patmatch.tl
+++ b/tests/011/patmatch.tl
@@ -43,7 +43,7 @@
^((,(find-struct-type 'grommet) :grom)
(,(find-struct-type 'widget) :widg)))
-(test (when-match @(let w (@a @b @c)) '(1 2 3) (list w a b c)) ((1 2 3) 1 2 3))
+(test (when-match @(as w (@a @b @c)) '(1 2 3) (list w a b c)) ((1 2 3) 1 2 3))
(test (when-match @(require (+ @a @b) (equal a b)) '(+ z z) (list a b)) (z z))
(test (if-match @(require (+ @a @b) (equal a b)) '(+ y z)
@@ -84,7 +84,7 @@
(test (if-match @(or (@x 3 3) (1 @x 3) (1 2 @x)) '(1 2 3) x) 2)
(test (if-match @(op <= 10 @1 13) 11 :yes :no) :yes)
-(test (when-match @(let x @(op <= 10 @1 13)) 11 x) 11)
+(test (when-match @(as x @(op <= 10 @1 13)) 11 x) 11)
(test (when-match (@(evenp) @(oddp x)) '(2 3) x) 3)
(test (when-match @(or @(require @a (oddp a)) @b @c) 2 (list a b c))
@@ -110,17 +110,17 @@
(set *print-circle* t)
-(test (when-match @(let a @(some @a)) '#1=(1 2 #1# 3) :yes) :yes)
+(test (when-match @(as a @(some @a)) '#1=(1 2 #1# 3) :yes) :yes)
-(test (when-match (@a @(let a @(some @a))) '(#1=(1 2 #1# 3) #1#) :yes) :yes)
+(test (when-match (@a @(as a @(some @a))) '(#1=(1 2 #1# 3) #1#) :yes) :yes)
-(test (when-match (@a @(let a @(or x @a))) '(#1=(1 2 #1# 3) #1#) :yes) :yes)
+(test (when-match (@a @(as a @(or x @a))) '(#1=(1 2 #1# 3) #1#) :yes) :yes)
(defstruct node ()
left right)
(mlet ((n (lnew node left (new node left n))))
- (test (when-match @(let x @(struct node
+ (test (when-match @(as x @(struct node
left @(struct node left @x)))
n :yes)
:yes))