TR: `for` forms generalize types of sequences
Open
@samth is already working on this.
Since Apr 9, 2015.
gnats-migrated
- Dominant language
- Racket
- Stars
- 575
- Forks
- 106
- Avg merge
- 2h 1m
- Merged PRs (30d)
- 2
Description
Originally submitted on: Sat Dec 27 22:44:01 -0500 2014
The error in reproduction steps is
Type Checker: type mismatch
expected: Nonnegative-Real
given: Real in: r
Either of these works around it:
(for ([r : Nonnegative-Real (ann '(1 2 3 4) (Sequenceof Nonnegative-Real))])
(ann r Nonnegative-Real))
(for ([r (in-list (ann '(1 2 3 4) (Listof Nonnegative-Real)))])
(ann r Nonnegative-Real))
Steps to Reproduce:
#lang typed/racket
(for ([r (ann '(1 2 3 4) (Sequenceof Nonnegative-Real))])
(ann r Nonnegative-Real))
Release:
6.1.1.6--2014-12-21(-/f)
Environment:
unix "Linux snoopy 3.13.0-37-generic #64-Ubuntu SMP Mon Sep 22 21:28:38 UTC 2014 x86_64
x86_64 x86_64 GNU/Linux" (x86_64-linux/3m) (get-display-depth) = 32
Human Language: english
(current-memory-use) 1319035472
raco pkg (show):
Installation-wide:
Package Checksum Source
disassemble cf0ee3a5... catalog...ssemble
drbayes link...il/drbayes
main-distribution 67868e03... catalog...ibution
main-distribution-test ca4a870e... catalog...on-test
nonplussed f6c06999... url.../nonplussed
optimization-coach be5f7908... catalog...n-coach
pict3d link...eil/pict3d
plot e536986e... clone...path=plot
racket-lib static-link...lib
rsound 4f5d4d15... catalog rsound
slideshow-latex 9275fecb... catalog...w-latex
[214 auto-installed packages not shown]
User-specific for installation "development":
[none]
Collections:
("/home/neil/.racket/development/collects"
(non-existent-path))
("/home/neil/plt-fresh/racket/collects"
(".gitignore" "acks" "compiler" "data" "db" "dynext" "ffi" "file" "info" "info-domain"
"json" "launcher" "net" "openssl" "pkg" "planet" "racket" "raco" "reader" "realm" "s-exp"
"setup" "syntax" "unstable" "version" "xml"))
Recent Internal Errors: Saved 1 internal error:
sequence-contract-violation: negative: method set-max-width cannot be called, except in
states (unlocked write-lock), args 1221
context...:
/home/neil/plt-fresh/racket/collects/racket/private/more-scheme.rkt:147:2:
call-with-break-parameterization
/home/neil/plt-fresh/racket/collects/racket/private/more-scheme.rkt:264:2:
call-with-exception-handler
Computer Language: (("Determine language from source") (#(#t print mixed-fraction-e #f #t
none) (default) #() "#lang racket\n" #t #f ((test) (main)) #t))
This bug was converted from Gnats bug 14903.
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.
Assessment
This issue has not been assessed yet.