add paths to datum-order

closes PR 14225
This commit is contained in:
Ryan Culpepper 2013-12-05 11:34:45 -05:00
parent 98518c33e0
commit 5ea627165e
2 changed files with 9 additions and 2 deletions

View File

@ -214,7 +214,7 @@ all inexact numbers. Thus @racket[1] is considered distinct from
@racket[1.0], for example.
The following data types are currently supported: numbers, strings,
bytes, keywords, symbols, booleans, characters, null, pairs, vectors,
bytes, keywords, symbols, booleans, characters, paths, null, pairs, vectors,
boxes, prefab structs, and fully-transparent structs.
The following example comparisons are specified to return the results

View File

@ -154,6 +154,7 @@ Other:
< symbol
< bool
< char
< path
< null
< pair
< vector
@ -245,6 +246,12 @@ Other:
'<)]
[(char? y)
'>]
[(path-for-some-system? x)
(if (path-for-some-system? y)
(cmp* bytes<? bytes=? (path->bytes x) (path->bytes y))
'<)]
[(path-for-some-system? y)
'>]
[(null? x)
(if (null? y)
'=
@ -289,7 +296,7 @@ Other:
(raise-type-error
(if natural? 'natural-cmp 'datum-cmp)
(string-join '("number" "string" "bytes" "keyword" "symbol" "boolean" "character"
"null" "pair" "vector" "box"
"path" "null" "pair" "vector" "box"
"prefab struct" "or fully-transparent struct")
", ")
0 x y)]))