unofficial mirror of guile-user@gnu.org 
 help / color / mirror / Atom feed
* Goops generic-functions and srfi-64 tests
@ 2014-11-22 12:48 KAction
  2014-11-22 21:24 ` Ludovic Courtès
  0 siblings, 1 reply; 8+ messages in thread
From: KAction @ 2014-11-22 12:48 UTC (permalink / raw)
  To: guile-user

[-- 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 --]

^ permalink raw reply	[flat|nested] 8+ messages in thread
[parent not found: <mailman.91.1416675626.13049.guile-user@gnu.org>]

end of thread, other threads:[~2014-11-23 18:56 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-11-22 12:48 Goops generic-functions and srfi-64 tests KAction
2014-11-22 21:24 ` 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

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).