[plt-scheme] (provide (all-defined)) and generated temporaries

From: Doug Orleans (dougo at ccs.neu.edu)
Date: Thu Jul 10 18:32:27 EDT 2003

Matthew Flatt writes:
 > At Thu, 10 Jul 2003 03:42:50 -0400 (EDT), Doug Orleans wrote:
 > > It seems wrong that generated symbols are leaking out
 > Yes, it's wrong. I'll fix it.

In case you haven't already tracked down the problem, it looks like
it has nothing to do with modules, it's just that the generated
symbols aren't uninterned:

  Welcome to MzScheme version 204.7, Copyright (c) 1995-2003 PLT
  > (define-syntax (define-dummy stx)
      (syntax-case stx ()
	((_ sym exp)
	 (if (list? (syntax-local-context))
	     ;; Internal definition position; generate a dummy binding.
	     #`(define #,(car (generate-temporaries #'(sym))) exp)
	     ;; Otherwise, don't clutter the namespace.
  > (let () (define-dummy foo 3) foo1)

I only noticed the problem with modules because apparently the counter 
used by generate-temporaries starts at 1 for each module, so I was
getting name clashes.

--dougo at ccs.neu.edu

Posted on the users mailing list.