Hi JG,

You're correct that the `for/first` and `for/last` forms don't work
usually in TR, but that's what the documentation says: "Like the
above, except they are not yet supported by the typechecker.". Is
there a different way that could be phrased to make this clearer?

The omission of `#:break` in the documentation is just an oversight. A
PR fixing that would be welcome, or I'll try to do it soon.

`#:guard` is not intended to be used, because the type checker doesn't
understand what it does. However, some existing TR code relies on the
current treatment, so it isn't an error.

Sam

On Fri, Jan 26, 2018 at 6:06 AM, JCG <griffin...@gmail.com> wrote:
>
> In doing some typed/racket, I have noticed some mismatch between observed
> behavior and the documentation at
>
> https://docs.racket-lang.org/ts-reference/special-forms.html
>
> 1) Documentation suggests that for/first and for/last should work, yet they
> seem to not type check.  I've noticed sparse comments to that effect since
> 2014.
>
> 2) In working around for/first with for/fold, I discovered that #:break
> appears to function although the for loop documentation for typed racket
> (Section 2.3 in typed/racket reference) suggests that only the #:when guard
> is a keyword in the for/ family syntax.
>
> 3) In the struct documentation for typed racket, the many for syntax
> keywords shown do not include #:guard, yet it seems to work.
>
> Are #:break and #:guard correct to use in typed/racket or are they missing
> from the documentation intentionally?
>
> Thanks,
> JG
>
>
>
>
>
>
>
>
> --
> You received this message because you are subscribed to the Google Groups
> "Racket Users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to racket-users+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.

-- 
You received this message because you are subscribed to the Google Groups 
"Racket Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to racket-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to