I keep getting the messages like Type Checker: Inference for polymorphic keyword functions not supported in: (sort hash-list string<? #:key (λ ((p : (Pair Symbol Natural))) (symbol->string (car p))) #:cache-keys? #t)
or Type Checker: Polymorphic function `cons' could not be applied to arguments: Types: a (Listof a) -> (Listof a) a b -> (Pairof a b) Arguments: (U Exact-Nonnegative-Integer Symbol) (Listof (Pairof Symbol Nonnegative-Integer)) Expected result: (Listof (Pairof Symbol Nonnegative-Integer)) in: (for*/list : (Listof (Pair Symbol Natural)) ((p : (Pair Symbol Natural) (in-list (hash->sorted-list pname-map))) (k : Symbol (in-value (car p))) (v : Natural (in-value (cdr p))) #:when (not (= v 1)) (y (list k v))) y) Is there some systematic way to code this explicitly so it doesn't have to try guesswork? (hich it refuses to do) And is it really unable to figure out that an Exact-Nonnegative-Integer is a Nonnegative-Integer? -- hendrik -- You received this message because you are subscribed to the Google Groups "Racket Users" group. To unsubscribe from this group and stop receiving emails from it, send an email to racket-users+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/racket-users/20200518203342.4vcvrsrvkmld4tmh%40topoi.pooq.com.