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:
parent
7d72dc43c4
commit
a7b5d4af4b
|
@ -6,6 +6,7 @@
|
||||||
'#%paramz
|
'#%paramz
|
||||||
(only-in '#%kernel [apply kernel:apply])
|
(only-in '#%kernel [apply kernel:apply])
|
||||||
scheme/promise
|
scheme/promise
|
||||||
|
(only-in string-constants/private/only-once maybe-print-message)
|
||||||
(only-in scheme/match/runtime match:error))
|
(only-in scheme/match/runtime match:error))
|
||||||
|
|
||||||
[raise (Univ . -> . (Un))]
|
[raise (Univ . -> . (Un))]
|
||||||
|
@ -344,18 +345,19 @@
|
||||||
[bitwise-xor (null N . ->* . N)]
|
[bitwise-xor (null N . ->* . N)]
|
||||||
|
|
||||||
[vector (-poly (a) (->* (list) a (-vec a)))]
|
[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)]
|
[abs (N . -> . N)]
|
||||||
[substring (cl-> [(-String N) -String]
|
[substring (cl-> [(-String -Integer) -String]
|
||||||
[(-String N N) -String])]
|
[(-String -Integer -Integer) -String])]
|
||||||
[string-length (-String . -> . N)]
|
[string-length (-String . -> . -Integer)]
|
||||||
[string-set! (-String N -Char . -> . -Void)]
|
[string-set! (-String -Integer -Char . -> . -Void)]
|
||||||
[make-vector (-poly (a) (cl-> [(N) (-vec N)] [(N a) (-vec a)]))]
|
[make-vector (-poly (a) (cl-> [(-Integer) (-vec -Integer)]
|
||||||
|
[(-Integer a) (-vec a)]))]
|
||||||
|
|
||||||
[file-exists? (-Pathlike . -> . B)]
|
[file-exists? (-Pathlike . -> . B)]
|
||||||
[string->symbol (-String . -> . Sym)]
|
[string->symbol (-String . -> . Sym)]
|
||||||
[symbol->string (Sym . -> . -String)]
|
[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]
|
[call-with-input-file (-poly (a) (cl-> [(-String (-Port . -> . a)) a]
|
||||||
[(-String (-Port . -> . a) Sym) a]))]
|
[(-String (-Port . -> . a) Sym) a]))]
|
||||||
|
@ -365,9 +367,9 @@
|
||||||
[current-output-port (-Param -Output-Port -Output-Port)]
|
[current-output-port (-Param -Output-Port -Output-Port)]
|
||||||
[current-error-port (-Param -Output-Port -Output-Port)]
|
[current-error-port (-Param -Output-Port -Output-Port)]
|
||||||
[current-input-port (-Param -Input-Port -Input-Port)]
|
[current-input-port (-Param -Input-Port -Input-Port)]
|
||||||
[round (N . -> . N)]
|
[round (N . -> . -Integer)]
|
||||||
[seconds->date (N . -> . (make-Name #'date))]
|
[seconds->date (-Integer . -> . (make-Name #'date))]
|
||||||
[current-seconds (-> N)]
|
[current-seconds (-> -Integer)]
|
||||||
[path->string (-> -Path -String)]
|
[path->string (-> -Path -String)]
|
||||||
|
|
||||||
[link-exists? (-> -Pathlike B)]
|
[link-exists? (-> -Pathlike B)]
|
||||||
|
@ -477,3 +479,5 @@
|
||||||
|
|
||||||
[eof (-val eof)]
|
[eof (-val eof)]
|
||||||
[read-accept-reader (-Param B B)]
|
[read-accept-reader (-Param B B)]
|
||||||
|
|
||||||
|
[maybe-print-message (-String . -> . -Void)]
|
|
@ -75,6 +75,7 @@
|
||||||
[Boxof (-poly (a) (make-Box a))]
|
[Boxof (-poly (a) (make-Box a))]
|
||||||
[Syntax Any-Syntax]
|
[Syntax Any-Syntax]
|
||||||
[Identifier Ident]
|
[Identifier Ident]
|
||||||
|
[Procedure (make-Function (list (make-top-arr)))]
|
||||||
)
|
)
|
||||||
|
|
||||||
(define-other-types
|
(define-other-types
|
||||||
|
|
Loading…
Reference in New Issue
Block a user