On 25/08/2017 17:03, Konrad Hinsen wrote:
That adds the missing piece - thanks a lot! I had seriously
underestimated the complexity of module definitions in Racket.
A followup mostly for the benefit of those who find this thread in the
archives one day.
Importing a module this way works perfectly, but its utility for testing
is very limited. The problem I run into is illustrated by the following
raco test: (submod "lang-test.rkt" test)
document-contexts: contract violation;
given value instantiates a different structure type with the same name
given: (document (hash "test-context" ...
My code defines a structure called "document", which apparently exists
in two copies in memory. One is used by the module lang-test.rkt that
contains the tests, and the other one is used by the module that was
created from the text string. As a consequence, it is impossible to
perform any operation on the date from that module.
If all you recover from that module is basic Racket data structures,
everything works fine.
You received this message because you are subscribed to the Google Groups "Racket
To unsubscribe from this group and stop receiving emails from it, send an email
For more options, visit https://groups.google.com/d/optout.