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

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

2017-03-05 Thread kay
Thanks for pointing it out. I also figured later that the multiple return values was the problem here. Is this a TR type system limitation that polymorphic functions don't like multiple return values? Looks like it might be worth mentioning somewhere in the documentation or better in the error

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

2017-03-05 Thread WarGrey Gyoudmon Ju
The problem is not the `AnyValues` since it accepts all types, but you cannot instantiate a polymorphic type to return multiple values, so you have to return (cons ... ...) in dynamic-wind then extract that pair as two return values of the function. On Sun, Mar 5, 2017 at 3:23 PM, kay

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

2017-03-04 Thread kay
I have the following simple module that I'm converting to typed/racket. I got a type check error that I don't know how to fix. More specifically, it's related to the polymorphic function dynamic-wind's arguments. I read from document [1] that type inference doesn't work for a lambda that is an