On Mon, 06 Mar 2017 23:50:38 -0600,
lu wrote:
>
> Awesome. Thanks! Where can I find the documentation for this TR reader syntax?
>
> Why is TR not able to figure out the type for these variables without
> human help? Does that mean the implementation of `command-line` is in
> TR and the types of
Ah I found documentation for `#{ x : ... }` at here[1].
[1]:
https://docs.racket-lang.org/ts-guide/more.html#%28part._.Annotating_.Single_.Variables%29
On Monday, March 6, 2017 at 9:50:39 PM UTC-8, lu wrote:
> Awesome. Thanks! Where can I find the documentation for this TR reader syntax?
>
>
Awesome. Thanks! Where can I find the documentation for this TR reader syntax?
Why is TR not able to figure out the type for these variables without human
help? Does that mean the implementation of `command-line` is in TR and the
types of those variables are inferred by the type system, or they
You can use the #{x : T} reader syntax to annotate variables in macros
like `command-line`. Here's a working version of your code:
```
#lang typed/racket
(define *channel* (make-parameter "#general"))
(define *message* : (Parameterof (Listof String)) (make-parameter '()))
(define
1.5 years ago, I struggled with the command-line, finally I thought
`parse-command-line` is friendlier than its macro form `command-line`, and
got the solution with `cast`:
;;; firstly, define your precise Help-Table.
(define-type Help-Table
(Listof (U (Pairof 'usage-help String)
For a complex syntax form like `command-line`, I have difficulty correctly
annotate the bindings it defines.
More specifically, in the below code, for variable `msg`, even the document[1]
says the `#:args` binds as list of **strings**, but the error indicates that it
somehow is declared as
6 matches
Mail list logo