Skip to content

Commit 5ec9d76

Browse files
Copilotjackfirth
andauthored
Remove vestigial proper-syntax-path? predicate (#716)
Co-authored-by: copilot-swe-agent[bot] <[email protected]> Co-authored-by: jackfirth <[email protected]> Co-authored-by: Jack Firth <[email protected]>
1 parent b9e9f60 commit 5ec9d76

File tree

2 files changed

+3
-12
lines changed

2 files changed

+3
-12
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 & 11 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?))]
@@ -25,10 +24,8 @@
2524
[syntax-ref (-> syntax? syntax-path? syntax?)]
2625
[syntax-contains-path? (-> syntax? syntax-path? boolean?)]
2726
[syntax-set (-> syntax? syntax-path? syntax? syntax?)]
28-
[syntax-remove-splice
29-
(-> syntax? (and/c proper-syntax-path? nonempty-syntax-path?) exact-nonnegative-integer? syntax?)]
30-
[syntax-insert-splice
31-
(-> syntax? (and/c proper-syntax-path? nonempty-syntax-path?) (sequence/c syntax?) syntax?)]
27+
[syntax-remove-splice (-> syntax? nonempty-syntax-path? exact-nonnegative-integer? syntax?)]
28+
[syntax-insert-splice (-> syntax? nonempty-syntax-path? (sequence/c syntax?) syntax?)]
3229
[syntax-label-paths (-> syntax? symbol? syntax?)]))
3330

3431

@@ -92,14 +89,8 @@
9289
(check-false (nonempty-syntax-path? 42))))
9390

9491

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))))
9992

10093

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

10495
(define (syntax-path-add path element)
10596
(syntax-path (treelist-add (syntax-path-elements path) element)))

0 commit comments

Comments
 (0)