[plt-scheme] Using one signature in place of two

From: Matthew Flatt (mflatt at cs.utah.edu)
Date: Tue Dec 30 17:33:28 EST 2008

At Tue, 30 Dec 2008 16:57:16 +0000, "Noel Welsh" wrote:
> I'm having some fun with the unit system.
> 
> I have two signatures a^ and b^ which are used by mutually recursive
> units.  The consumers of the resulting compound unit always want to
> use the union of a^ and b^, so I defined a signature thus:
> 
> (define-signature c^ extends a^
>   ((open b^)))
> 
> and consumers specify they import c^ and I invoke thus:
> 
> (define-values/invoke-unit consumer@
>   (import c^)
>   (export consumer^))
> 
> This, however, doesn't work.  I get complaints about duplicate
> identifiers.  E.g.:
> 
> :unit: rename created duplicate identifier row-col->idx40 at: (rename
> row^ (struct:row22 struct:row) (make-row23 make-row) ...

I'm fairly certain that this is a bug in the unit system (related to
the expansion of `open' within a signature), but I don't yet know how
to fix it. I'm still thinking about it.


Matthew



Posted on the users mailing list.