[racket] recommendations how to use Typed Racket with rackunit?
>
> I would keep using `define-struct:' for the time being; I'll
> investigate why this isn't working. It isn't obvious at first glance,
> but the `struct:' code is doing some complicated tricks.
I was already suspecting that struct: must somehow be different from define-struct: in TR, because I had #:property prop:equal+hash working with define-struct: but not with struct: in 5.0.1, but there downloading 5.0.2 fixed the problem :-;
In fact it would be great if you could look into it, because the change to struct: is just wonderful from an aesthetic perspective already, it makes the code look so much cleaner (especially with deeply nested structures) :-;
BTW having switched to 5.0.2 now, I'm enthusiastic about the performance gains too - the TR code seems to execute much faster now - thanks for that too :-)
>
> Check out the `racket/load' language for exactly this purpose.
Sorry I don't get it - is there a way I could use it to have both struct: and not get the syntax error?
I've tried (without really understanding the chapter in the reference, I must admit)
#lang racket/load
(require rackunit)
(require rackunit/text-ui)
(require "../types.rkt")
(require "../tests/types-test.rkt")
but I get the same error
../tests/types-test.rkt:15:23: Triple: illegal use of syntax in: (Triple "count" number? 1)
Sigrid