[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Goops generic-functions and srfi-64 tests
From: |
KAction |
Subject: |
Goops generic-functions and srfi-64 tests |
Date: |
Sat, 22 Nov 2014 15:48:50 +0300 |
User-agent: |
Mutt/1.5.22.1 (2013-10-16) |
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 <address@hidden>,
Free Software supporter, esperantisto and netiquette guardian.
GPG: 54B7F00D
pgp5d3L2BubbE.pgp
Description: PGP signature
- Goops generic-functions and srfi-64 tests,
KAction <=