unofficial mirror of guile-devel@gnu.org 
 help / color / mirror / Atom feed
* empty default duplicates handler
@ 2007-08-21 22:07 Kevin Ryde
  2007-08-22  8:24 ` Ludovic Courtès
  0 siblings, 1 reply; 2+ messages in thread
From: Kevin Ryde @ 2007-08-21 22:07 UTC (permalink / raw)
  To: guile-devel

Is it supposed to work to set the default duplicates handling to an
empty list?  Eg. foo.scm containing

	(define-module (foo)
	  #:duplicates ()
	  #:use-module (srfi srfi-1))
	(pk map)

It seems to work in 1.8, but in the head it's giving

	=> Unbound variable: map

I had this in my program as a global setting

	(default-duplicate-binding-handler '())

Either way if empty isn't allowed it'd be nice to throw an error
immediately, the same as a bogus handler name symbol does.

The effect I wanted was no work at all done for duplicates checking.
Modules can override/extend the core by shadowing, but I'm confident
there's no clashes between my modules and don't want time spent looking
at that.  Or is '(last) the policy I should be asking for to get that
non-checking effect?


_______________________________________________
Guile-devel mailing list
Guile-devel@gnu.org
http://lists.gnu.org/mailman/listinfo/guile-devel


^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: empty default duplicates handler
  2007-08-21 22:07 empty default duplicates handler Kevin Ryde
@ 2007-08-22  8:24 ` Ludovic Courtès
  0 siblings, 0 replies; 2+ messages in thread
From: Ludovic Courtès @ 2007-08-22  8:24 UTC (permalink / raw)
  To: Kevin Ryde; +Cc: guile-devel

Hi,

Kevin Ryde <user42@zip.com.au> writes:

> Is it supposed to work to set the default duplicates handling to an
> empty list?

Why not, but we need to define the semantics.

> It seems to work in 1.8, but in the head it's giving
>
> 	=> Unbound variable: map

In `resolve_duplicate_binding ()', we could initialize RESULT to VAR2,
for instance (which would behave like `last', I think).

> I had this in my program as a global setting
>
> 	(default-duplicate-binding-handler '())
>
> Either way if empty isn't allowed it'd be nice to throw an error
> immediately, the same as a bogus handler name symbol does.
>
> The effect I wanted was no work at all done for duplicates checking.
> Modules can override/extend the core by shadowing, but I'm confident
> there's no clashes between my modules and don't want time spent looking
> at that.  Or is '(last) the policy I should be asking for to get that
> non-checking effect?

I think we could do the above change and document that `()' is
equivalent to `(last)'.

What do you think?

Thanks,
Ludovic.



_______________________________________________
Guile-devel mailing list
Guile-devel@gnu.org
http://lists.gnu.org/mailman/listinfo/guile-devel


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2007-08-22  8:24 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-08-21 22:07 empty default duplicates handler Kevin Ryde
2007-08-22  8:24 ` Ludovic Courtès

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).