GNU bug report logs - #19459
#:export does not honor the merge-generics contract

Previous Next

Package: guile;

Reported by: David Pirotte <david <at> altosw.be>

Date: Sun, 28 Dec 2014 18:22:01 UTC

Severity: normal

Full log


View this message in rfc822 format

From: Andy Wingo <wingo <at> pobox.com>
To: David Pirotte <david <at> altosw.be>
Cc: 19459 <at> debbugs.gnu.org
Subject: bug#19459: #:export does not honor the merge-generics contract
Date: Fri, 24 Jun 2016 07:02:31 +0200
On Thu 23 Jun 2016 23:11, David Pirotte <david <at> altosw.be> writes:

>> However... I believe merge-generics is intended to merge duplicate
>> imported bindings.  It does not provide a copy-on-write version of an
>> imported generic, if that generic was not duplicated in the imports.
>> There is no facility in GOOPS to do that, AFAIU.
>
> It is a module bug, not a GOOPS bug, see my 'personal/local' fix: the problem is
> that once the user uses #:export, guile's module system create a new binding, and it
> should not ... [hence this confusion as well: as it is: the module must merge its
> definition with the imported ones, even if it imported only 1 generic ... because of
> a module bug...]

I... I just think you're wrong here, sorry :/ That's just not how the
system works.  If you #:export an identifier in a module, you create a
fresh local binding, and that binding doesn't implicitly extend an
imported binding, merge-generics or no.  Merge-generics only operates on
the import interface of a module.

Andy




This bug report was last modified 8 years and 353 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.