typed-racket icon indicating copy to clipboard operation
typed-racket copied to clipboard

`require/typed` yields "unused require" warnings

Open bjornkihlberg opened this issue 1 year ago • 0 comments

require/typed produces multiple inexplicable unused require warnings. This is not strictly a problem but it still make me wonder what is going on here.

What version of Racket are you using?

Environment

What program did you run?

Minimal example to reproduce issue

#lang typed/racket

(module my-sub-module racket
  (provide f g)
  (define (f x) (* x 2))
  (define (g x) (+ x 2)))

(require/typed 'my-sub-module
               [f (-> Real Real)]
               [g (-> Real Real)])

(displayln (f (g 5)))

What should have happened?

I don't think I should get unused require warnings for this program.

If you got an error message, please include it here.

Each annotated identifier seems to produce two unused require each.

  • Screenshot 1: image
  • Screenshot 2: image

bjornkihlberg avatar Apr 27 '24 21:04 bjornkihlberg