Hello! Recently I noticed, that srfi-64 `assert-equal` macro do not use `equal?` that was redefinded via `define-method` in scope of invocation of `assert-equal`. It means, that
(define e1 (make <foo> #:x 2))
(define e2 (make <foo> #:x 2))
(equal? e1 e2) ;; Overloaded to return #t
(assert-equal (make <foo> #:x 2) (make <foo> #:x 2)) ;; fails
Why it happens, is clear. Since scheme macros are hygienic, equal? in
expansion of `assert-equal` is sealed to refer to (@@ (srfi srfi-64)
equal?). I belive, in presence of goops, it would be nice add
(define-syntax equal?
(identifier-syntax (module-ref (current-module) 'equal?))
I do not see, what would it break, but maybe I am missing something?
PS. Please, keep me in CC.
--
Best regards, Dmitry Bogatov <[email protected]>,
Free Software supporter, esperantisto and netiquette guardian.
GPG: 54B7F00D
pgpdXTpBK0RLx.pgp
Description: PGP signature
