From 5ea627165e9c1d6931aecbce19e5a8c2193294da Mon Sep 17 00:00:00 2001 From: Ryan Culpepper Date: Thu, 5 Dec 2013 11:34:45 -0500 Subject: [PATCH] add paths to datum-order closes PR 14225 --- pkgs/data-pkgs/data-doc/data/scribblings/order.scrbl | 2 +- pkgs/data-pkgs/data-lib/data/order.rkt | 9 ++++++++- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/pkgs/data-pkgs/data-doc/data/scribblings/order.scrbl b/pkgs/data-pkgs/data-doc/data/scribblings/order.scrbl index cfe4791651..d1ca17dfc9 100644 --- a/pkgs/data-pkgs/data-doc/data/scribblings/order.scrbl +++ b/pkgs/data-pkgs/data-doc/data/scribblings/order.scrbl @@ -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 diff --git a/pkgs/data-pkgs/data-lib/data/order.rkt b/pkgs/data-pkgs/data-lib/data/order.rkt index 8d233b0b84..1976af26c7 100644 --- a/pkgs/data-pkgs/data-lib/data/order.rkt +++ b/pkgs/data-pkgs/data-lib/data/order.rkt @@ -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* bytesbytes 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)]))