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

From: Henk Boom (henk at henk.ca)
Date: Sat Feb 28 23:16:27 EST 2009

2009/2/28 Neil Van Dyke <neil at neilvandyke.org>:
> 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)?

Speaking very roughly, in Scheme, the scope of the expanded S is the
scope in which S is defined, not the scope in which it is used.

So, as long as SM 'require's PM, the client shouldn't have to know
anything about PM.


Posted on the users mailing list.