build-list type check error with identity or values
Open
Nobody has claimed this yet.
- Dominant language
- Racket
- Stars
- 575
- Forks
- 106
- Avg merge
- 2h 1m
- Merged PRs (30d)
- 2
Description
Racket v6.3
#lang typed/racket
(build-list 10 values)
(build-list 10 identity)
Type checker complains
t.rkt:3:0: Type Checker: Polymorphic function `build-list' could not be applied to arguments:
Argument 1:
Expected: Integer
Given: Positive-Byte
Argument 2:
Expected: (-> Index a)
Given: (All (a b ...) (case-> (-> (values)) (-> a a) (-> a b ... b (values a b ... b))))
Result type: (Listof a)
Expected result: AnyValues
Is this behaviour intended?
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 Racket v6.3 example using typed/racket with build-list and values or identity, then inspect how the type checker applies build-list's polymorphic function type. Determine whether these calls should type-check; done means the intended behavior is documented or the reported type-checking problem is resolved and covered by a regression check.
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
- Needs clarification
- Newbie friendliness
- 35/100