unofficial mirror of bug-guile@gnu.org 
 help / color / mirror / Atom feed
From: David Pirotte <david@altosw.be>
To: Andy Wingo <wingo@pobox.com>
Cc: bug-guile@gnu.org, "Ludovic Courtès" <ludo@gnu.org>
Subject: Re: module system / (oop goops) / :duplicates (merge-generics) / bug?
Date: Thu, 7 Jul 2011 13:26:59 -0300	[thread overview]
Message-ID: <20110707132659.2cee382d@rascar> (raw)
In-Reply-To: <87ipre48zj.fsf@pobox.com>

Hello Andy,
Ludovic,

...
> > (define-module (mg-1)
> >   :use-module (oop goops)
> >
> >   :duplicates (merge-generics)
> >
> >   :export (<widget-a>
> > 	    dialog
> > 	    ))
> 
> Here the #:duplicates is unnecessary, because you are not importing any
> duplicate bindings.

Yes, I think our messages 'crossed' somehow, as you probably know by now, I did
posted a slightly modified version of this small example while answering Ludovic ...
but thanks.

...
> But here you need other duplicates handlers, not just merge-generics;
> merge-generics doesn't handle the other (default-duplicates-handlers).
> 
> So you could change to have:
> 
>   #:duplicates (merge-generics replace warn-override-core warn last)
> 
> But even now it didn't work, because of some deep bugs that have been
> lurking in merge-generics support since 2007 at least (though not
> present in 1.8).  I believe I have fixed these; can you update and test?

Yes, it works, great!

Now, in order to make  (merge-generics replace warn-override-core warn last)
'my' default, i.e. in my init.scm, what should I do? 

I looked at boot-9.scm, but it's unclear to me, since it's not just a list of
symbols but calls make-mutable-parameter which I am unfamiliar with. Also, is
merge-generics 'defined' so that modules not using (oop goops) will still 'be happy'?

So the question is, would it be possible to configure [init.scm] guile in a way that
it automatically sets, when a module is using (oop goops), that the
(default-duplicate-binding-handler) then returns the above?

Many thanks,
David



  reply	other threads:[~2011-07-07 16:26 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-07-05 21:32 module system / (oop goops) / :duplicates (merge-generics) / bug? David Pirotte
2011-07-06 16:17 ` Ludovic Courtès
2011-07-06 19:22   ` David Pirotte
2011-07-07 11:37     ` Andy Wingo
2011-07-07 16:26       ` David Pirotte [this message]
2011-07-07 20:59         ` Andy Wingo
2011-07-08 17:05           ` David Pirotte
2011-07-09 10:02             ` Andy Wingo
2011-07-09 15:08               ` David Pirotte
2011-07-11 15:49                 ` Andy Wingo
2011-07-12  1:25                   ` David Pirotte
2011-08-18 11:01                     ` Andy Wingo
2011-08-19  5:40                       ` David Pirotte
2011-08-29 17:05                         ` David Pirotte
2011-08-30  2:56                           ` David Pirotte
2011-09-02 11:26                           ` Andy Wingo
2011-09-06 15:41                             ` David Pirotte
2011-08-03 12:28                   ` David Pirotte

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=20110707132659.2cee382d@rascar \
    --to=david@altosw.be \
    --cc=bug-guile@gnu.org \
    --cc=ludo@gnu.org \
    --cc=wingo@pobox.com \
    /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).