[plt-scheme] Unit won't Import
I'm having trouble a unit that imports another. It errors out on an
"unbound identifier" and I'm not sure what I'm doing wrong. I made a
test case that illustrates my confusion regarding units. I'll attach the
files here.
The 'thing unit has a procedure to test and create a dummy struct, given
funny names because I wasn't sure if the default struct bindings were
exporting right. The 'test unit imports the 'thing unit, only has a test
procedure, which creates and tests a dummy 'thing struct. And finally
"test.ss" does a 'define-values/invoke-unit/infer on the test unit and
attempts to apply the subsequently defined value 'test.
I'm not sure if the signature is wrong, of if I don't understand
something about units, or what needs to be done. If I comment out the
commented lines in "test.ss" it works fine, but it seems like that
rather defeats the purpose of units in the first place. In my larger
project I have recursive dependencies between units and thus can't pick
a particular order to 'define-values/invoke-unit/infer them in. If I
have to pick an order I may as well be using modules instead, or maybe
parameterizing all these procedures so calling procedures can change the
behavior of called procedures.
I'm a bit new to units, just trying to figure them out. Any help would
be appreciated. Might end up trying a new strategy anyway, but I was
curious what was wrong with my understanding here.
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: thing-sig.ss
URL: <http://lists.racket-lang.org/users/archive/attachments/20090806/de192069/attachment.ksh>
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: thing-unit.ss
URL: <http://lists.racket-lang.org/users/archive/attachments/20090806/de192069/attachment-0001.ksh>
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: test-sig.ss
URL: <http://lists.racket-lang.org/users/archive/attachments/20090806/de192069/attachment-0002.ksh>
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: test-unit.ss
URL: <http://lists.racket-lang.org/users/archive/attachments/20090806/de192069/attachment-0003.ksh>
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: test.ss
URL: <http://lists.racket-lang.org/users/archive/attachments/20090806/de192069/attachment-0004.ksh>