Re: [racket-users] (curry map string->number) in Typed Racket

2019-08-28 Thread Jon Zeppieri
On Wed, Aug 28, 2019 at 9:58 AM Štěpán Němec wrote: > > On Wed, 28 Aug 2019 09:23:03 -0400 > Jon Zeppieri wrote: > > [...] > > >> Does that mean that for higher-order function parameters, inst expects > >> only the return type signature, not that of the function itself? > > > > The main point here

Re: [racket-users] (curry map string->number) in Typed Racket

2019-08-28 Thread Štěpán Němec
On Wed, 28 Aug 2019 09:23:03 -0400 Jon Zeppieri wrote: [...] >> Does that mean that for higher-order function parameters, inst expects >> only the return type signature, not that of the function itself? > > The main point here is that `inst` needs substitutions for the type > _variables_, not for

Re: [racket-users] (curry map string->number) in Typed Racket

2019-08-28 Thread Jon Zeppieri
On Wed, Aug 28, 2019 at 5:59 AM Štěpán Němec wrote: > > On Thu, 22 Aug 2019 16:40:03 -0400 > Jon Zeppieri wrote: > > > (curry (inst map (U Complex False) String) > > string->number) > > > > ... typechecks, but in your expression, you're going to need to handle > > the possibility that the

Re: [racket-users] (curry map string->number) in Typed Racket

2019-08-28 Thread Štěpán Němec
On Thu, 22 Aug 2019 16:40:03 -0400 Jon Zeppieri wrote: > (curry (inst map (U Complex False) String) > string->number) > > ... typechecks, but in your expression, you're going to need to handle > the possibility that the pattern variables in `list-rest` pattern are > #f. Many thanks for t

Re: [racket-users] (curry map string->number) in Typed Racket

2019-08-22 Thread Jon Zeppieri
(curry (inst map (U Complex False) String) string->number) ... typechecks, but in your expression, you're going to need to handle the possibility that the pattern variables in `list-rest` pattern are #f. - Jon On Thu, Aug 22, 2019 at 4:15 PM Štěpán Němec wrote: > > > I have a hard time

[racket-users] (curry map string->number) in Typed Racket

2019-08-22 Thread Štěpán Němec
I have a hard time persuading Typed Racket to accept the expression "(curry map string->number)". No amount of type annotations or added `inst`s (as recommended by the guide[1]) I could come up with seem to help. Is there a way to make it work? [1] https://docs.racket-lang.org/ts-guide/caveats