From abc83496b358557a96af72dbd3d8ffecf5982c9a Mon Sep 17 00:00:00 2001 From: Sam Tobin-Hochstadt Date: Mon, 3 May 2010 11:31:27 -0400 Subject: [PATCH] fix literal hashtables and pairs --- collects/typed-scheme/typecheck/tc-expr-unit.rkt | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/collects/typed-scheme/typecheck/tc-expr-unit.rkt b/collects/typed-scheme/typecheck/tc-expr-unit.rkt index 834aa68f5c..49305965ec 100644 --- a/collects/typed-scheme/typecheck/tc-expr-unit.rkt +++ b/collects/typed-scheme/typecheck/tc-expr-unit.rkt @@ -68,6 +68,12 @@ [_ (make-Vector (apply Un (for/list ([l (syntax-e #'i)]) (tc-literal l #f))))])] + [(~var i (3d hash?)) + (let* ([h (syntax-e #'i)] + [ks (hash-map h (lambda (x y) (tc-literal x)))] + [vs (hash-map h (lambda (x y) (tc-literal y)))]) + (make-Hashtable (apply Un ks) (apply Un vs)))] + [(a . b) (-pair (tc-literal #'a) (tc-literal #'b))] [_ Univ]))