From: KAction@gnu.org
To: guile-user@gnu.org
Subject: Goops generic-functions and srfi-64 tests
Date: Sat, 22 Nov 2014 15:48:50 +0300 [thread overview]
Message-ID: <20141122124850.GA15241@self> (raw)
[-- Attachment #1: Type: text/plain, Size: 887 bytes --]
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 <KAction@gnu.org>,
Free Software supporter, esperantisto and netiquette guardian.
GPG: 54B7F00D
[-- Attachment #2: Type: application/pgp-signature, Size: 836 bytes --]
next reply other threads:[~2014-11-22 12:48 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-11-22 12:48 KAction [this message]
2014-11-22 21:24 ` Goops generic-functions and srfi-64 tests Ludovic Courtès
2014-11-23 7:27 ` Dmitry Bogatov
2014-11-23 17:20 ` Ludovic Courtès
2014-11-23 18:56 ` Dmitry Bogatov
[not found] <mailman.91.1416675626.13049.guile-user@gnu.org>
2014-11-23 13:07 ` Daniel Llorens
2014-11-23 13:47 ` Taylan Ulrich Bayırlı/Kammer
2014-11-23 13:56 ` Daniel Llorens
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.gnu.org/software/guile/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20141122124850.GA15241@self \
--to=kaction@gnu.org \
--cc=guile-user@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).