Re: [racket-users] How to type annotate for bindings in complex syntax forms

2017-03-06 Thread lu
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? > >

Re: [racket-users] How to type annotate for bindings in complex syntax forms

2017-03-06 Thread lu
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

[racket-users] Redefine how Racket prints

2017-03-06 Thread Vasily Rybakov
I want to change how Racket prints some values both in REPL and when using (print), (println), e.t.c. Suppose that I want change like this (gives as simple example): (define (print~ datum [out (current-output-port)] [quote-depth 0]) (if (number? datum) (print `',datum out 1)

Re: [racket-users] How to type annotate for bindings in complex syntax forms

2017-03-06 Thread Sam Tobin-Hochstadt
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

Re: [racket-users] How to type annotate for bindings in complex syntax forms

2017-03-06 Thread WarGrey Gyoudmon Ju
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)

Re: [racket-users] Typed Racket: Polymorphic function `dynamic-wind' could not be applied to arguments

2017-03-06 Thread Ben Greenman
On Mon, Mar 6, 2017 at 1:18 AM, kay wrote: > Looks like it might be worth mentioning somewhere in the documentation Good idea, what do you think of this change: https://github.com/racket/typed-racket/pull/508 -- You received this message because you are subscribed to the