Make Bottom generalize to Any instead of Integer.

This commit is contained in:
Eric Dobson 2013-07-20 17:18:27 -07:00
parent 5d2c9a67e8
commit 265603ed69
3 changed files with 3 additions and 0 deletions

View File

@ -1,6 +1,7 @@
;; The Computer Language Benchmarks Game
;; http://shootout.alioth.debian.org/
(: translation (Vectorof Integer))
(define translation (make-vector 128))
(for: ([from : Char (in-string "ACGTUMRWSYKVHDBN")]

View File

@ -20,6 +20,7 @@
[(Value: '()) (-lst Univ)]
[(Value: 0) -Int]
[(List: ts) (-lst (apply Un ts))]
[(? (lambda (t) (subtype t -Bottom))) Univ]
[(? (lambda (t) (subtype t -Int))) -Int]
[(? (lambda (t) (subtype t -Rat))) -Rat]
[(? (lambda (t) (subtype t -Flonum))) -Flonum]

View File

@ -1692,6 +1692,7 @@
(tc-l #"foo" -Bytes)
[tc-l () (-val null)]
[tc-l (3 . 4) (-pair -PosByte -PosByte)]
[tc-l #hash() (make-Hashtable Univ Univ)]
[tc-l #hash((1 . 2) (3 . 4)) (make-Hashtable -Integer -Integer)]
[tc-l #hasheq((a . q) (b . w)) (make-Hashtable -Symbol -Symbol)])
[tc-l #hash{[:a . :b]}