Skip to content

Commit fefb9cd

Browse files
Copilotjackfirth
andcommitted
Remove syntax-path-element? and syntax-path-element<=> entirely
Co-authored-by: jackfirth <[email protected]>
1 parent 8deb063 commit fefb9cd

File tree

1 file changed

+3
-12
lines changed

1 file changed

+3
-12
lines changed

private/syntax-path.rkt

Lines changed: 3 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,6 @@
1414
[empty-syntax-path syntax-path?]
1515
[syntax-path (-> (sequence/c exact-nonnegative-integer?) syntax-path?)]
1616
[syntax-path-elements (-> syntax-path? (treelist/c exact-nonnegative-integer?))]
17-
[syntax-path-element? (-> any/c boolean?)]
1817
[syntax-path-parent (-> nonempty-syntax-path? syntax-path?)]
1918
[syntax-path-next-neighbor (-> syntax-path? (or/c syntax-path? #false))]
2019
[syntax-path-last-element (-> nonempty-syntax-path? exact-nonnegative-integer?)]
@@ -57,10 +56,6 @@
5756

5857
;@----------------------------------------------------------------------------------------------------
5958

60-
; syntax-path-element? is now just exact-nonnegative-integer?
61-
(define syntax-path-element? exact-nonnegative-integer?)
62-
63-
6459
(struct syntax-path (elements)
6560
#:transparent
6661
#:sealed
@@ -950,17 +945,13 @@
950945
['< lesser]))))
951946

952947

953-
; syntax-path-element<=> is now just natural<=> from rebellion
954-
(define syntax-path-element<=> natural<=>)
955-
956-
957948
(module+ test
958-
(test-case "syntax-path-element<=>"
949+
(test-case "natural<=>"
959950
(define unsorted
960951
(list 2 5 1 3 42 0))
961952

962953
(define sorted
963-
(sort unsorted (λ (a b) (compare-infix syntax-path-element<=> a < b))))
954+
(sort unsorted (λ (a b) (compare-infix natural<=> a < b))))
964955

965956
(define expected
966957
(list 0 1 2 3 5 42))
@@ -970,5 +961,5 @@
970961

971962

972963
(define syntax-path<=>
973-
(comparator-map (lexicographic-comparator syntax-path-element<=>) syntax-path-elements
964+
(comparator-map (lexicographic-comparator natural<=>) syntax-path-elements
974965
#:name 'syntax-path<=>))

0 commit comments

Comments
 (0)