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
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
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
(
3 matches
Mail list logo