require/typed extra includes aren't always included at the top-level
Nobody has claimed this yet.
- Dominant language
- Racket
- Stars
- 575
- Forks
- 106
- Avg merge
- 2h 1m
- Merged PRs (30d)
- 2
Description
What version of Racket are you using
HEAD (6.5.0.5)
What program did you run?
Welcome to Racket v6.5.0.5.
-> (define-syntax (m stx)
#'(begin (require/typed racket/base [#:struct exn ([message : String] [continuation-marks : Null])]) exn))
-> (m)
; link: bad variable linkage;
; reference to a variable that is uninitialized
; reference phase level: 0
; variable module:
; "/home/asumu/plt/racket-git/extra-pkgs/typed-racket/typed-racket-lib/typed-racket/utils/any-wrap.rkt"
; variable phase: 0
; reference in module: #f
; in: struct-predicate-procedure?/c
; [,bt for context]
What should have happened?
I expected the contract wrapping to happen.
Possible solution: just always include the extra-requires in the top-level. I'm not sure why the flag isn't getting set properly for this case though, so that's maybe worrying.
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reproducing the linked require/typed example on the reported Racket version and inspect typed-racket/utils/any-wrap.rkt, especially the struct-predicate-procedure?/c linkage. Trace how extra-requires are collected for the macro-expanded top level. Done means the example performs contract wrapping without the bad variable linkage error, with a regression test for this case.
Written by the indexing model from the issue text.
Assessment
- Domain
- compilers
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100