[plt-scheme] Units with 1 piece missing

From: Noel Welsh (noelwelsh at gmail.com)
Date: Thu Aug 13 08:21:26 EDT 2009

On Thu, Aug 13, 2009 at 5:01 AM, Synx<plt at synx.us.to> wrote:
> Besides being full of redundancy, there are a few problems with that
> code. First off, the documentation says "The right-hand side of a link
> declaration specifies the imports to be supplied to the unit produced by
> the corresponding unit-expr." But the syntax only allows one import to
> be supplied to the unit. So my "runner FOO BAR BAZ BLECH ..." thing
> errors out, and the docs sure don't offer any suggestion how to specify
> "imports" that it claims are possible.

Here's the content of an email I sent some time ago which I think
addresses this question:

The documentation is, I think, incorrect. It states, for compound-unit/infer:

(link infer-linkage-decl ...))


infer-linkage-decl = ((link-binding ...) unit-id tagged-link-id)
               | unit-id

where tagged-link-id (defined at compound-unit) is:

tagged-link-id =        (tag id link-id)
               | link-id

I think there should be ellipses after tagged-link-id. So:

infer-linkage-decl = ((link-binding ...) unit-id tagged-link-id ...)
               | unit-id

for both compound-unit and compound-unit/infer

On Fri, Jun 5, 2009 at 2:26 AM, Matthias Felleisen<matthias at ccs.neu.edu> wrote:
> (define [email protected]
>  (compound-unit
>    (import)
>    (export)
>    (link (((A : cluster^)) [email protected])
>          (((C : cluster^)) [email protected] (tag a A) (tag b A))
>          (((B : mt^))      [email protected] C))))

> Secondly, I have to require all the signatures from all those modules,
> to explicitly export them in the compound unit. When I make a compound
> unit definition thing for every time I want to swap out a run^, I only
> have to require "run-sig.ss".
> What I'm basically saying is I want something like this:
> ---

Inferred linking does 1/2 of this I believe. The other 1/2, requiring
all those signatures... just put them all in one file if you don't
like writing long require expresssions.


Posted on the users mailing list.