[plt-scheme] can macros introduce references to unit-imported ids?

From: Matthew Flatt (mflatt at cs.utah.edu)
Date: Tue Aug 12 11:24:24 EDT 2003

At Mon, 11 Aug 2003 16:35:53 -0400, "Felix Klock's PLT scheme proxy" wrote:
> procedure application: expected procedure, given: #<undefined>; 
> arguments were: bug1-var "bug1-var desc" (b1v) #f #f

A nicer error message would be "tried to use `make-variable' before its
definition has been executed"...

> (define bug@
>    (compound-unit/sig
>      (import)
>      (link (B1 : bug1^ (bug1@ BC))
>            (BC : bugc^ (bug-com@)))
>      (export (open B1))))

If you swap the order of the B1 and BC lines in the `link' clause, I
think it will work correctly for you.


Posted on the users mailing list.