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

Re: Compund units in extensions



On Sat, 26 Feb 2000, Matthew Flatt wrote:
> [snip]
> > 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)).

So it would be ((A a1 a2)(B b1))

> [snip]

I tried that and I can now return my compound unit from the load-extension
call.  The new problem I have is that when I try to use define-values on it
it chokes with a:

(require-library "invoke.ss")
(define x (load-extension "try-ext.so"))
(define-values/invoke-unit (one) x blah)
  compound-unit: import at tag "export-extractor" failed from tag
"unit-to-invoke", name "one"

If I remove 

I am attaching the Makefile/C/SS in case anyone wants to poke at it.  I
have paired the file down so it only has 1 unit in it specified with the
tag "unit1" and one function "one".  The SS file worked for me when the
extension returned a unit.

The abo

Thanks.
RJA

try-ext.c

try-ext.ss

Makefile