Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

typed/rackunit: with-check-info broken #160

Open
dergemkr opened this issue Sep 2, 2022 · 1 comment
Open

typed/rackunit: with-check-info broken #160

dergemkr opened this issue Sep 2, 2022 · 1 comment

Comments

@dergemkr
Copy link

dergemkr commented Sep 2, 2022

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.

@sorawee
Copy link
Contributor

sorawee commented Mar 31, 2024

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants