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
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
Matthew,
On 12/10/2016 06:22 PM, Matthew Flatt wrote:
At Mon, 5 Dec 2016 10:19:03 -0700, Matthew Flatt wrote:
There's a pending issue of making sure that `for` loops or other things
are not needlessly instrumented, since they're only part of the
expansion instead of the original code. We
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
> 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
> 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
Ah, thanks.
Anyone else have other ideas for problems using syntax-properties, or maybe
make-rename-transformers (with not-free-identifier=?), across modules?
--
William J. Bowman
On Sun, Dec 11, 2016 at 07:54:29PM -0500, Alex Knauth wrote:
>
> > On Dec 11, 2016, at 7:20 PM, 'William J.
7 matches
Mail list logo