racket / racket/typed-racket

Regression in type-checking `for*/list` forms when annotation is not directly in the form

Open
#588 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Racket
Stars
575
Forks
106
Avg merge
2h 1m
Merged PRs (30d)
2

Description

(Sorry to discover this a bit late. I hope it's not a release blocker. It's not a problem for me if nobody else incurs it)

What version of Racket are you using?

v6.10.0.1

What program did you run?
#lang typed/racket/base

(define ns : (Listof Number)
  (for*/list ([n '(1 2 3)]
              [m '(4 5)])
    42))
What should have happened?

Program type checks as in v6.9.0.4

If you got an error message, please include it here.
; Type Checker: Error in macro expansion -- insufficient type information to typecheck. please add more type annotations
;   in: (for*/list ((n (quote (1 2 3))) (m (quote (4 5)))) 42)

If I move the annotation to inside the for*/list form, it typechecks as expected:

#lang typed/racket/base

(define ns
  (for*/list : (Listof Number) ([n '(1 2 3)]
                                [m '(4 5)])
    42))

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

No files or tests are named. Run the supplied typed/racket/base program under v6.10.0.1 and v6.9.0.4, then trace the for*/list type-checking and macro-expansion path. Done means the outer Listof Number annotation type-checks as it did in v6.9.0.4.

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
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.