Re: [racket-users] Inference for polymorphic functions not supported?

2020-05-19 Thread Hendrik Boom
On Mon, May 18, 2020 at 04:51:26PM -0400, Sam Tobin-Hochstadt wrote: > The systematic way to do it is to use `inst`. > > Here's the first example: > > (define hash-list : (Listof (Pair Symbol Natural)) (list)) > ((inst sort (Pair Symbol Natural) String) hash-list string ((p : (Pair Symbol

Re: [racket-users] Inference for polymorphic functions not supported?

2020-05-18 Thread Hendrik Boom
On Mon, May 18, 2020 at 04:51:26PM -0400, Sam Tobin-Hochstadt wrote: > The systematic way to do it is to use `inst`. > > Here's the first example: > > (define hash-list : (Listof (Pair Symbol Natural)) (list)) > ((inst sort (Pair Symbol Natural) String) hash-list string ((p : (Pair Symbol

Re: [racket-users] Inference for polymorphic functions not supported?

2020-05-18 Thread Ben Greenman
On 5/18/20, Hendrik Boom wrote: > I keep getting the messages like > > Type Checker: Inference for polymorphic keyword functions not supported in: > (sort hash-list string (symbol->string (car p))) #:cache-keys? #t) The way to avoid guesswork here is `inst`: ((inst sort (Pair Symbol Natural)