Re: [racket] Question about Typed Racket

2015-02-13 Thread Antonio Menezes Leitao
BTW, are there any plans for supporting #:constructor-name in Typed Racket struct? Best, António. Racket Users list: http://lists.racket-lang.org/users

Re: [racket] Question about Typed Racket

2015-02-12 Thread Sam Tobin-Hochstadt
I don't think you're doing anything wrong, and I expect that this case [1] needs a bit of generalization to handle polymorphic structs. [1] https://github.com/racket/typed-racket/blob/master/typed-racket-lib/typed-racket/typecheck/tc-app/tc-app-hetero.rkt#L82-L83 Sam On Thu, Feb 12, 2015 at 8:2

[racket] Question about Typed Racket

2015-02-12 Thread Antonio Menezes Leitao
Hi, The following example works in Typed Racket: (struct foo ([c : Float] [f : (foo -> Float)])) (define (test [f : foo]) : Float ((foo-f f) f)) (test (foo 1.0 (lambda ([x : foo]) : Float (match x ((foo c _) c) (struct bar foo ([i : Float])) (test (bar 1.0 (