[plt-scheme] Renaming module identifiers

From: dvanhorn at emba.uvm.edu (dvanhorn at emba.uvm.edu)
Date: Thu Nov 7 20:00:59 EST 2002

Quoting dvanhorn at emba.uvm.edu:

> Is it possible to rename all exported identifiers of a module using a
> function (symbol -> symbol)?
> From the documentation it seems only explicit renaming is allowed and must be
> done for each identifier you wish to rename.  So then my question is,
> could I add this functionality?
> eg.
> (require (rename-all some-module (lambda (x) x)))         ;; no change
> (require (rename-all some-module (lambda (x) (gensym))))  ;; take an advil

Perhaps if I stated my problem, rather than my attempt at a solution I would've
gotten more responses.

I have some modules that provide a lot of identifiers.  These modules follow a
pretty simple, but verbose and ugly naming scheme.  It's possible to write a
function that maps these names to much more usable names, but it looks like I
have to spell everything out, identifier by identifier.  Is this true?  Can I
get around it?

Modifying the actual modules is not an option for me.


dvanhorn at cs dot uvm dot edu

Posted on the users mailing list.