fix literal hashtables and pairs

This commit is contained in:
Sam Tobin-Hochstadt 2010-05-03 11:31:27 -04:00
parent 6a7aaf48cc
commit abc83496b3

View File

@ -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]))