[plt-scheme] when syntax from one planet package expands to uses from another package

From: Carl Eastlund (carl.eastlund at gmail.com)
Date: Sat Feb 28 21:59:27 EST 2009

You should just be able to require PM into wherever the define-syntax
for S is.  The client doesn't need to know where your references are
coming from.

If S is instead defined as a transformer function and later required
for-syntax somewhere else, you should require PM for-template wherever
that transformer function is.

Either way you define S, you can require PM appropriately into your
planet package without informing your clients.  This is the same for
planet or any other kind of module -- once you have a reference to a
variable in the appropriate phase, your macros can expand into code
that refers to it without any special interface between you and the


On Sat, Feb 28, 2009 at 9:53 PM, Neil Van Dyke <neil at neilvandyke.org> wrote:
> I'm not sure the best way to handle this...
> Module "SM" exports syntax "S".
> Syntax "S" sometimes expands to code that refers to procedure "P" from
> module "PM".
> Modules "SM" and "PM" are coming from two separate PLaneT packages.
> Should "SM" merely document that the code that imports "SM" must also
> explicitly import "PM"?
> Or should "SM" export all of "PM", and require that any code importing "SM"
> must not explicitly import "PM"?
> Or something else (such as renaming PM exports, or exporting wrappers around
> PM exports)?
> Thanks,
> Neil

Posted on the users mailing list.