Add type for Procedure.

Fix types to use Integer instead of Number where appropriate.
add type for maybe-print-message.

svn: r12141
This commit is contained in:
Sam Tobin-Hochstadt 2008-10-27 15:16:22 +00:00
parent 7d72dc43c4
commit a7b5d4af4b
2 changed files with 15 additions and 10 deletions

View File

@ -6,6 +6,7 @@
'#%paramz
(only-in '#%kernel [apply kernel:apply])
scheme/promise
(only-in string-constants/private/only-once maybe-print-message)
(only-in scheme/match/runtime match:error))
[raise (Univ . -> . (Un))]
@ -344,18 +345,19 @@
[bitwise-xor (null N . ->* . N)]
[vector (-poly (a) (->* (list) a (-vec a)))]
[make-string (cl-> [(N) -String] [(N -Char) -String])]
[make-string (cl-> [(-Integer) -String] [(-Integer -Char) -String])]
[abs (N . -> . N)]
[substring (cl-> [(-String N) -String]
[(-String N N) -String])]
[string-length (-String . -> . N)]
[string-set! (-String N -Char . -> . -Void)]
[make-vector (-poly (a) (cl-> [(N) (-vec N)] [(N a) (-vec a)]))]
[substring (cl-> [(-String -Integer) -String]
[(-String -Integer -Integer) -String])]
[string-length (-String . -> . -Integer)]
[string-set! (-String -Integer -Char . -> . -Void)]
[make-vector (-poly (a) (cl-> [(-Integer) (-vec -Integer)]
[(-Integer a) (-vec a)]))]
[file-exists? (-Pathlike . -> . B)]
[string->symbol (-String . -> . Sym)]
[symbol->string (Sym . -> . -String)]
[vector-length (-poly (a) ((-vec a) . -> . N))]
[vector-length (-poly (a) ((-vec a) . -> . -Integer))]
[call-with-input-file (-poly (a) (cl-> [(-String (-Port . -> . a)) a]
[(-String (-Port . -> . a) Sym) a]))]
@ -365,9 +367,9 @@
[current-output-port (-Param -Output-Port -Output-Port)]
[current-error-port (-Param -Output-Port -Output-Port)]
[current-input-port (-Param -Input-Port -Input-Port)]
[round (N . -> . N)]
[seconds->date (N . -> . (make-Name #'date))]
[current-seconds (-> N)]
[round (N . -> . -Integer)]
[seconds->date (-Integer . -> . (make-Name #'date))]
[current-seconds (-> -Integer)]
[path->string (-> -Path -String)]
[link-exists? (-> -Pathlike B)]
@ -477,3 +479,5 @@
[eof (-val eof)]
[read-accept-reader (-Param B B)]
[maybe-print-message (-String . -> . -Void)]

View File

@ -75,6 +75,7 @@
[Boxof (-poly (a) (make-Box a))]
[Syntax Any-Syntax]
[Identifier Ident]
[Procedure (make-Function (list (make-top-arr)))]
)
(define-other-types