> On Dec 12, 2016, at 1:31 PM, Alex Knauth wrote:
>
> #lang typed/racket
>
> (define ls (port->list read (open-input-string "1 2 3 4")))
> (for ([n (assert ls (λ ([ls : (Listof Any)]) (andmap number? ls)))])
> (displayln (* n n)))
>
I think this suggests that TR
> On Dec 12, 2016, at 10:40 AM, Winston Weinert wrote:
>
> Thanks. I wrote a rudimentary syntax transformer, but really I don't know the
> best way to work around this -- and I'm not very proficient with syntax
> transformers. I could put all of my code which I would
Thanks. I wrote a rudimentary syntax transformer, but really I don't know the
best way to work around this -- and I'm not very proficient with syntax
transformers. I could put all of my code which I would prefer to be top level
in a procedure/let context, but I don't really think this is the
Typed Racket only follows control flow like you've written inside
expressions, not at the top-level of a module. So this program will
work correctly:
#lang typed/racket
(define (f)
(define ls (port->list read (open-input-string "1 2 3 4")))
(unless (andmap number? ls)
(error "ls not read
Hi, the following code listing gives me this TR error:
; /home/winston/code/practice/snippets/tr.rkt:7:16: Type Checker: type mismatch
; expected: Number
; given: Any
; in: n
; /home/winston/code/practice/snippets/tr.rkt:7:18: Type Checker: type mismatch
; expected: Number
; given: Any
5 matches
Mail list logo