bug-guile
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#20093: master: setting merge-generics duplicate-binding-handler @ ex


From: David Pirotte
Subject: bug#20093: master: setting merge-generics duplicate-binding-handler @ expand time raises an error
Date: Sun, 3 Jul 2016 19:10:07 -0300

Hello Andy,

Further to the previous answer [of July the 2th 2016]

> ...
> But, you say, I only specified the duplicates handler after loading
> goops!  Well indeed, but if a module didn't specify #:duplicates, its
> duplicates handling was implicitly dynamically scoped to whatever the
> current default-duplicates-handlers were.  That seems bogus to me: the
> module declares its imports and exports and a lack of a declaration of
> #:duplicates indicates that the module is implicitly specifying the
> duplicate handlers that are described in the manual.

I disagree with the way you [now' re-] interpret things: if a module has no
#:duplicates declaration, it is implicitly specifying the duplicate handlers 
returned by (default-duplicate-binding-handler), _not_ the one from the
manual.

IMO, this was an API, and for me, a hard coded list instead of querying an API 
does
not offer any advantage, at the contrary, a step backward in 'power'.

> In master I have changed the `default-duplicate-binding-handler' to
> simply access the handlers for the current module, as that seems to be
> the correct thing.  Let me know how it goes!  Closing as done but let's
> follow up :)

This breaks all my code, with no other option but maintaining my own
boot-9 version: I really wish I can avoid that, could you reconsider? [no, I 
don't
want to have to use #:duplicates, since I _always_ [like always always always] 
want
my modules to grab my global setting and default].

As you understood by now, I need 2 things wrt duplicate handlers:

        1.      I must be able to patch guild, so it ,use (oop goops) and set
                these before I compile my modules [with or without 
--no-auto-compile
                does not matter]. All my scripts do so as well of course [1]

                #!/bin/sh
                # -*- scheme -*-
                exec ${GUILE:-/opt2/bin/guile} --no-auto-compile -e '(@@ 
(guild) main)' -s "$0" "$@"
                !#

                (eval-when (expand load eval)
                  (use-modules (oop goops))
                  (default-duplicate-binding-handler
                    '(merge-generics replace warn-override-core warn last)))

                ...

                This does not work anymore, I hope it can be fixed

        2.      obviously, the above only make sense if modules grab
                (default-duplicate-binding-handler) when no #:duplicates 
declaration

                I can maintain my own boot-9 but wish to avoid this solution.

Cheers,
David

[1] 
http://git.savannah.gnu.org/cgit/grip.git/tree/grip/clutter/examples/bouncer.in

Attachment: pgpOqQ_d45JHk.pgp
Description: OpenPGP digital signature


reply via email to

[Prev in Thread] Current Thread [Next in Thread]