From c04e3c7cd6726a95da3d58979f582afb7a5b722f Mon Sep 17 00:00:00 2001 From: Rose Hogenson Date: Sun, 24 Jul 2022 16:20:00 -0700 Subject: Export some common comparers from hash-map. --- csc/macros.csc | 20 ++++++++++++-------- 1 file changed, 12 insertions(+), 8 deletions(-) (limited to 'csc/macros.csc') diff --git a/csc/macros.csc b/csc/macros.csc index 1edecd2..9afeea9 100644 --- a/csc/macros.csc +++ b/csc/macros.csc @@ -17,6 +17,7 @@ insert key-not-found-error? lookup + make-comparer map-for-each merge) (only (csc ir1) @@ -383,17 +384,20 @@ finally (return (< (length m1) (length m2))))) - (define (cmp-identifiers i1 i2) - (cond - ((bound-identifier=? i1 i2) 0) - ((or (stringstring (identifier-name i1)) (symbol->string (identifier-name i2))) - (marksstring (identifier-name i1)) (symbol->string (identifier-name i2))) + (markssubstitutions l) - (alist->map hash-identifier cmp-identifiers l)) + (alist->map compare-identifiers l)) (define (is-underscore expression) -- cgit v1.3.1