typed/rackunit: with-check-info broken
dergemkr opened this issue · comments
Given the following program on Racket v8.6 [cs]:
#lang typed/racket
(require rackunit)
(for-each
(lambda (elt)
(with-check-info
(('current-element elt))
(check-pred odd? elt)))
(list 1 3 5 7 8))
The following error is generated at compile time:
; test.rkt:7:5: Type Checker: missing type for identifier;
; consider using `require/typed' to import it
; identifier: with-check-info*
; from module: check-info.rkt
; in: (with-check-info (((quote current-element) elt)) (check-pred odd? elt))
...
and other similar errors for make-check-info
and provide/contract-id-syntax->location
(which I've only seen references to on racket/typed-racket#989).
I've poked around for a fix but haven't found a solution yet. If you can point me in the right direction, I can try to make a patch.
It makes sense that rackunit
won't work, but I do expect typed/rackunit
to work, and it doesn't.
It's weird since typed/rackunit
is supposed to export the type for with-check-info*
:
https://github.com/racket/rackunit/blob/master/rackunit-typed/rackunit/main.rkt#L156