[plt-scheme] drscheme feature idea: automatically add missing exports for scheme modules

From: Thomas Chust (chust at web.de)
Date: Mon Jul 27 09:20:57 EDT 2009

2009/7/27 Neil Van Dyke <neil at neilvandyke.org>:
> [...]
> Just, before releasing a library, once the interface is solidly designed and
> documented I want to change the "provide all defined" to not include the "%"
> names, so that I'm not polluting namespaces of library users.
> [...]


you could simply use

  (require scheme/provide)
  (provide (matching-identifiers-out #px"^(?!%)" (all-defined-out)))

to provide all identifiers that don't start with a percent sign.

By the way, the documentation of matching-identifiers-out in PLT
Scheme 4.2 is apparently wrong, because it states that all identifiers
matching the regular expression specified as the first parameter will
be *omitted* from the exports, while experiment confirms that *only
the matching identifiers* are exported.


When C++ is your hammer, every problem looks like your thumb.

Posted on the users mailing list.