[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Compund units in extensions



Quoting Robert John Andersen:
> In assembling the compound unit does the tag in the link
> specification match the tag in the exports argument?

Yes.

> So if I have a compound unit composed of
> the 2 following units:
> 
>   A: no imports, exports a1 and a2
>   B: no imports, exports b1
> 
> would the links specification be (A ((A a1 a2) (B b1))) 

You don't have to specify anything about the exports of each unit (just
like the `link' clause in a `compound-unit' expression). Only the
imports. Since there are no imports for either A or B, the links
specification is just ((A) (B)).

Suppose that B imported A's a1. Then the links specification would be
((A) (B (A a1)).

> and the exports
> argument ((A (a1 a2) (B b1)).
               ^

Right, but without the extra open parenthesis before a1.

> Also, how do the units specified in make_compound_unit match up with
> the information in the assembly?

Good question. The subs array should be in parallel to the tags in the
assembly's links specification. So in the above example, the subs array
should contain the A unit then the B unit. (I'll patch the docs.)

Matthew