match macro's pattern fail procedures need an import
Open
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?
v6.12
What program did you run?
#lang typed/racket
(match 5
[5 (=> fail) (fail) 15]
[5 10])
What should have happened?
Using #lang racket, the program outputs 10.
The error message requests an additional import. Adding
(require/typed racket/match/runtime
[ match-prompt-tag (Prompt-Tagof Void (-> Void))])
doesn't help, so I assume that Typed Racket itself needs a similar import.
If you got an error message, please include it here.
a.rkt:7:9: Type Checker: missing type for identifier;
consider using `require/typed' to import it
identifier: match-prompt-tag
from module: runtime.rkt
in: fail
a.rkt:7:9: Type Checker: Polymorphic function `call-with-continuation-prompt' could not be applied to arguments:
Types: (-> b) -> Any
(-> b) (Prompt-Tagof b (-> c ... c d)) (-> c ... c d) -> (U b d)
(-> b) (Prompt-Tagof b (-> (-> d) d)) -> (U b d)
Arguments: (-> Nothing) Nothing (-> AnyValues)
Expected result: AnyValues
in: fail
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
Reproduce the typed/racket program shown in the issue and compare it with the racket result. Start by tracing the match macro's fail procedure handling and the Typed Racket treatment of match-prompt-tag and call-with-continuation-prompt. Done means the example type-checks and runs without the user's manual require/typed import.
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
- 38/100