add type check guards to comparators
This commit is contained in:
parent
bb9be2c628
commit
e5511027e8
|
@ -113,8 +113,12 @@
|
||||||
(dictionary-set! cache sym id)
|
(dictionary-set! cache sym id)
|
||||||
id)))
|
id)))
|
||||||
|
|
||||||
(define (compare sym1 sym2)
|
(define (compare x y)
|
||||||
(identifier=? use-env sym1 use-env sym2))
|
(if (not (symbol? x))
|
||||||
|
#f
|
||||||
|
(if (not (symbol? y))
|
||||||
|
#f
|
||||||
|
(identifier=? use-env x use-env y))))
|
||||||
|
|
||||||
(f expr rename compare)))
|
(f expr rename compare)))
|
||||||
|
|
||||||
|
@ -161,8 +165,12 @@
|
||||||
(dictionary-set! cache sym id)
|
(dictionary-set! cache sym id)
|
||||||
id)))
|
id)))
|
||||||
|
|
||||||
(define (compare sym1 sym2)
|
(define (compare x y)
|
||||||
(identifier=? mac-env sym1 mac-env sym2))
|
(if (not (symbol? x))
|
||||||
|
#f
|
||||||
|
(if (not (symbol? y))
|
||||||
|
#f
|
||||||
|
(identifier=? mac-env x mac-env y))))
|
||||||
|
|
||||||
(unwrap (f (wrap expr) inject compare))))
|
(unwrap (f (wrap expr) inject compare))))
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue