From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: David Pirotte Newsgroups: gmane.lisp.guile.bugs Subject: Re: module system / (oop goops) / :duplicates (merge-generics) / bug? Date: Thu, 7 Jul 2011 13:26:59 -0300 Message-ID: <20110707132659.2cee382d@rascar> References: <20110705183229.6f779a6b@rascar> <87vcvfcrjc.fsf@gnu.org> <20110706162244.2bf4b90a@rascar> <87ipre48zj.fsf@pobox.com> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Trace: dough.gmane.org 1310057815 4378 80.91.229.12 (7 Jul 2011 16:56:55 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Thu, 7 Jul 2011 16:56:55 +0000 (UTC) Cc: bug-guile@gnu.org, Ludovic =?UTF-8?B?Q291cnTDqHM=?= To: Andy Wingo Original-X-From: bug-guile-bounces+guile-bugs=m.gmane.org@gnu.org Thu Jul 07 18:56:51 2011 Return-path: Envelope-to: guile-bugs@m.gmane.org Original-Received: from lists.gnu.org ([140.186.70.17]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1Qersg-0006xJ-Lx for guile-bugs@m.gmane.org; Thu, 07 Jul 2011 18:56:50 +0200 Original-Received: from localhost ([::1]:46782 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Qersf-0002Mb-EX for guile-bugs@m.gmane.org; Thu, 07 Jul 2011 12:56:49 -0400 Original-Received: from eggs.gnu.org ([140.186.70.92]:36446) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QerQ5-00027i-CU for bug-guile@gnu.org; Thu, 07 Jul 2011 12:27:18 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1QerQ3-0003CG-SP for bug-guile@gnu.org; Thu, 07 Jul 2011 12:27:16 -0400 Original-Received: from maximusconfessor.all2all.org ([62.58.108.13]:60180) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QerQ3-0003Bt-Gu; Thu, 07 Jul 2011 12:27:15 -0400 Original-Received: from localhost (unknown [192.168.0.2]) by maximusconfessor.all2all.org (Postfix) with ESMTP id 4BB06A04C2EA; Thu, 7 Jul 2011 18:27:12 +0200 (CEST) Original-Received: from maximusconfessor.all2all.org ([192.168.0.1]) by localhost (maximusconfessor.all2all.org [192.168.0.2]) (amavisd-new, port 10024) with ESMTP id F8nr0eZaUFPh; Thu, 7 Jul 2011 18:08:38 +0200 (CEST) Original-Received: from rascar (unknown [189.60.162.202]) by maximusconfessor.all2all.org (Postfix) with ESMTPSA id 826EAA04C2A1; Thu, 7 Jul 2011 18:27:04 +0200 (CEST) In-Reply-To: <87ipre48zj.fsf@pobox.com> X-Mailer: Claws Mail 3.7.9 (GTK+ 2.24.4; i486-pc-linux-gnu) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3) X-Received-From: 62.58.108.13 X-BeenThere: bug-guile@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "Bug reports for GUILE, GNU's Ubiquitous Extension Language" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-guile-bounces+guile-bugs=m.gmane.org@gnu.org Original-Sender: bug-guile-bounces+guile-bugs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.lisp.guile.bugs:5712 Archived-At: Hello Andy, Ludovic, ... > > (define-module (mg-1) > > :use-module (oop goops) > > > > :duplicates (merge-generics) > > > > :export ( > > 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