Skip to content

Commit 9c817c3

Browse files
Copilotjackfirth
andcommitted
Remove vestigial proper-syntax-path? predicate
Co-authored-by: jackfirth <[email protected]>
1 parent 6c9c767 commit 9c817c3

File tree

2 files changed

+3
-10
lines changed

2 files changed

+3
-10
lines changed

private/syntax-delta.rkt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@
4949

5050
(struct splice-replacement (start-path replaced-children-count new-children)
5151
#:transparent
52-
#:guard (struct-guard/c proper-syntax-path? exact-nonnegative-integer? (treelist/c added-syntax?))
52+
#:guard (struct-guard/c syntax-path? exact-nonnegative-integer? (treelist/c added-syntax?))
5353
#:sealed)
5454

5555

private/syntax-path.rkt

Lines changed: 2 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@
1010
[syntax-path<=> (comparator/c syntax-path?)]
1111
[empty-syntax-path? (-> any/c boolean?)]
1212
[nonempty-syntax-path? (-> any/c boolean?)]
13-
[proper-syntax-path? (-> any/c boolean?)]
1413
[empty-syntax-path syntax-path?]
1514
[syntax-path (-> (sequence/c exact-nonnegative-integer?) syntax-path?)]
1615
[syntax-path-elements (-> syntax-path? (treelist/c exact-nonnegative-integer?))]
@@ -26,9 +25,9 @@
2625
[syntax-contains-path? (-> syntax? syntax-path? boolean?)]
2726
[syntax-set (-> syntax? syntax-path? syntax? syntax?)]
2827
[syntax-remove-splice
29-
(-> syntax? (and/c proper-syntax-path? nonempty-syntax-path?) exact-nonnegative-integer? syntax?)]
28+
(-> syntax? (and/c syntax-path? nonempty-syntax-path?) exact-nonnegative-integer? syntax?)]
3029
[syntax-insert-splice
31-
(-> syntax? (and/c proper-syntax-path? nonempty-syntax-path?) (sequence/c syntax?) syntax?)]
30+
(-> syntax? (and/c syntax-path? nonempty-syntax-path?) (sequence/c syntax?) syntax?)]
3231
[syntax-label-paths (-> syntax? symbol? syntax?)]))
3332

3433

@@ -92,14 +91,8 @@
9291
(check-false (nonempty-syntax-path? 42))))
9392

9493

95-
(define (proper-syntax-path? v)
96-
(and (syntax-path? v)
97-
(for/and ([elem (in-treelist (syntax-path-elements v))])
98-
(exact-nonnegative-integer? elem))))
9994

10095

101-
; TODO: add tests for proper-syntax-path?
102-
10396

10497
(define (syntax-path-add path element)
10598
(syntax-path (treelist-add (syntax-path-elements path) element)))

0 commit comments

Comments
 (0)