File tree Expand file tree Collapse file tree 2 files changed +14
-4
lines changed
redex-doc/redex/scribblings/ref Expand file tree Collapse file tree 2 files changed +14
-4
lines changed Original file line number Diff line number Diff line change @@ -29,8 +29,7 @@ stands for repetition unless otherwise indicated):
29
29
(in-hole term term)
30
30
hole
31
31
(mf-apply identifier term ... )
32
- #t #f
33
- string]
32
+ literal]
34
33
[term-sequence
35
34
term
36
35
,@expr
@@ -64,8 +63,15 @@ them.}
64
63
@item{A term written @racket[(mf-apply f arg ... )] asserts that @racket[f]
65
64
is a @tech{metafunction} and produces the term @racket[(f arg ... )].}
66
65
67
- @item{A term written as a literal boolean or a string
68
- produces the boolean or the string.}
66
+ @item{A term written as a literal produces that literal.
67
+ Term substitution and metafunction application do not occur
68
+ within literal values. For example,
69
+
70
+ @racketblock[
71
+ (term-let ([a 1 ]) (term #hash((x . a))))
72
+ ]
73
+
74
+ Evaluates to @racket['#hash((x . a))], not @racket['#hash((x . 1 ))].}
69
75
]
70
76
71
77
@defform*[[(term @#,tttterm) (term @#,tttterm #:lang lang-id)]]{
Original file line number Diff line number Diff line change 13
13
(test (term (1 ,(+ 1 1 ))) (list 1 2 ))
14
14
(test (term-let ([x 1 ]) (term (x x))) (list 1 1 ))
15
15
(test (term-let ([(x ... ) (list 1 2 3 )]) (term ((y x) ... ))) '((y 1 ) (y 2 ) (y 3 )))
16
+ (test (term #hash((a . 2 ))) #hash((a . 2 )))
17
+ (test (term-let ([x 1 ]) #hash((a . x))) #hash((a . x)))
18
+ (test (term #s(a 2 3 4 )) #s(a 2 3 4 ))
19
+ (test (term-let ([x 1 ]) #s(a 2 x 4 )) #s(a 2 x 4 ))
16
20
17
21
(test (term (in-hole (1 hole) 2 )) (term (1 2 )))
18
22
(test (term (in-hole (1 hole (hole x)) 2 )) (term (1 2 (hole x))))
You can’t perform that action at this time.
0 commit comments