Skip to content

Commit cde767a

Browse files
committed
Use eq? in remove-duplicates.
This avoids implcitly using equal?, which is not implemented.
1 parent eb59d14 commit cde767a

2 files changed

Lines changed: 3 additions & 4 deletions

File tree

langs/outlaw/compile-literals.rkt

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -35,12 +35,11 @@
3535

3636
;; Prog -> [Listof Symbol]
3737
(define (literals p)
38-
(remove-duplicates
39-
(map to-symbol (literals* p))))
38+
(remove-duplicates (map to-symbol (literals* p)) eq?))
4039

4140
;; Prog -> [Listof Symbol]
4241
(define (symbols p)
43-
(remove-duplicates (filter symbol? (literals* p))))
42+
(remove-duplicates (filter symbol? (literals* p)) eq?))
4443

4544
;; (U String Symbol) -> Symbol
4645
(define (to-symbol s)

langs/outlaw/fv.rkt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
;; Expr -> [Listof Id]
66
;; List all of the free variables in e
77
(define (fv e)
8-
(remove-duplicates (fv* e)))
8+
(remove-duplicates (fv* e) eq?))
99

1010
;; Expr [Listof Id] -> [Listof Id]
1111
(define (fv- e xs)

0 commit comments

Comments
 (0)