[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#19459: #:export does not honor the merge-generics contract
From: |
Andy Wingo |
Subject: |
bug#19459: #:export does not honor the merge-generics contract |
Date: |
Fri, 24 Jun 2016 07:02:31 +0200 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/24.5 (gnu/linux) |
On Thu 23 Jun 2016 23:11, David Pirotte <address@hidden> 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