`call-with-values` looses precision when called with built-in `list`
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?
6.9.0.4
What program did you run?
#lang typed/racket
(call-with-values (λ () (values 1 'b)) list) ;; Has type (Listof (U 1 'b))
(call-with-values (λ () (values 1 'b)) (λ #:∀ (A ...) [l : A ... A] l)) ;; Has type (List 1 'b)
What should have happened?
The type of (call-with-values (λ () (values 1 'b)) list) should be (List 1 'b)
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 two typed/racket examples from the issue, comparing the inferred types for built-in list and the polymorphic lambda. Trace the call-with-values type-checking path and list's type handling; done means the built-in list case infers (List 1 'b) without changing the lambda 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
- 42/100