#TypedRacket has just got way more powerful. The following code gets typechecked as is:
(: eval-with (All (a) (-> (VariableMapping a) Any AnyValues)))
(define (eval-with ht expr)
(parameterize ([current-namespace (make-base-namespace)])
(for ([(x val) (in-hash ht)]) (namespace-set-variable-value! x val))
(eval expr)))
Six months ago I spent a couple days trying to get eval-with
to typecheck, only to get the answer on the mailing list that Typed Racket couldn’t do that. Well now not only can it do this, it also has dependent types!
I’m extremely excited 😍
QOTO: Question Others to Teach Ourselves
An inclusive, Academic Freedom, instance
All cultures welcome.
Hate speech and harassment strictly forbidden.