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

From: Doug Orleans (dougo at ccs.neu.edu)
Date: Thu Jul 10 03:42:50 EDT 2003

It would be nice if the `(all-defined)' provide specifier didn't
provide bindings that were produced by `generate-temporaries', or else
if there were another provide specifier that acted this way.  A silly

  (module dprintf mzscheme
    (provide dprintf)
    ;; A version of printf that can be used in an internal-define
    ;; context (as well as top-level or module context):
    (define-syntax (dprintf stx)
      (syntax-case stx ()
	((_ . args)
	 (with-syntax (((dummy) (generate-temporaries (syntax (_)))))
	   (syntax (define dummy (printf . args)))))))

  (module use-dprintf mzscheme
    (require "dprintf.scm")
    (provide (all-defined))
    (dprintf "ok~%")

  Welcome to MzScheme version 204.7, Copyright (c) 1995-2003 PLT
  > (require "use-dprintf.scm")
  > dprintf1

It seems wrong that generated symbols are leaking out-- maybe I'm
asking for trouble using `(provide (all-defined))', but it's there and
I'm lazy so I'm going to use it.  :)

--dougo at ccs.neu.edu

Posted on the users mailing list.