aboutsummaryrefslogtreecommitdiffstats
path: root/csc/macros.csc
diff options
context:
space:
mode:
authorRose Hogenson <rhogenson@posteo.net>2022-07-02 23:04:28 -0700
committerRose Hogenson <rhogenson@posteo.net>2022-07-02 23:04:28 -0700
commit37e086d27d478246e72b8f5c1b75ed5d092495fa (patch)
treebae0ac5e3c7f0984ef259da6ad5d6f094b64e588 /csc/macros.csc
parent429aa3c3c58d93c3897fafc98d9b44ddc271e0d6 (diff)
downloadchromatopelma-37e086d27d478246e72b8f5c1b75ed5d092495fa.tar.zst
Write closure conversion.
I desperately need a diffing library.
Diffstat (limited to 'csc/macros.csc')
-rw-r--r--csc/macros.csc10
1 files changed, 3 insertions, 7 deletions
diff --git a/csc/macros.csc b/csc/macros.csc
index 6364e19..045194b 100644
--- a/csc/macros.csc
+++ b/csc/macros.csc
@@ -17,7 +17,6 @@
insert
key-not-found-error?
lookup
- make-map
map-for-each
merge)
(only (csc ir1)
@@ -374,15 +373,12 @@
(hash-bytevector (string->utf8 (identifier-uuid i))))
- (define (cmp-identifier i1 i2)
- (cond
- ((string<? (identifier-uuid i1) (identifier-uuid i2)) -1)
- ((string=? (identifier-uuid i1) (identifier-uuid i2)) 0)
- (else 1)))
+ (define (identifier<? i1 i2)
+ (string<? (identifier-uuid i1) (identifier-uuid i2)))
(define (alist->substitutions l)
- (alist->map hash-identifier cmp-identifier l))
+ (alist->map hash-identifier identifier<? l))
(define (is-underscore expression)