Added type signatures for some byte-string functions.

original commit: ecb614849c30cc437b2cb7004321bc9e88fba8fa
This commit is contained in:
Vincent St-Amour 2010-06-17 12:13:50 -04:00
parent ec41142ab4
commit af2fa50318

View File

@ -559,14 +559,35 @@
((-HT a b) -Integer . -> . b))]
[bytes (->* (list) -Integer -Bytes)]
[bytes? (make-pred-ty -Bytes)]
[make-bytes (cl-> [(-Integer -Integer) -Bytes]
[(-Integer) -Bytes])]
[bytes->immutable-bytes (-> -Bytes -Bytes)]
[byte? (make-pred-ty -Nat)]
[bytes-ref (-> -Bytes -Integer -Nat)]
[bytes-set! (-> -Bytes -Integer -Integer -Void)]
[bytes-append (->* (list) -Bytes -Bytes)]
[subbytes (cl-> [(-Bytes -Integer) -Bytes] [(-Bytes -Integer -Integer) -Bytes])]
[bytes-length (-> -Bytes -Nat)]
[bytes-copy (-> -Bytes -Bytes)]
[bytes-copy! (-Bytes -Integer -Bytes [-Integer -Integer] . ->opt . -Void)]
[bytes-fill! (-> -Bytes -Integer -Void)]
[unsafe-bytes-length (-> -Bytes -Nat)]
[bytes->list (-> -Bytes (-lst -Nat))]
[list->bytes (-> (-lst -Integer) -Bytes)]
[bytes<? (->* (list -Bytes) -Bytes B)]
[bytes>? (->* (list -Bytes) -Bytes B)]
[bytes=? (->* (list -Bytes) -Bytes B)]
[bytes->string/utf-8 (-Bytes [(Un (-val #f) -Char) -Integer -Integer] . ->opt . -String)]
[bytes->string/locale (-Bytes [(Un (-val #f) -Char) -Integer -Integer] . ->opt . -String)]
[bytes->string/latin-1 (-Bytes [(Un (-val #f) -Char) -Integer -Integer] . ->opt . -String)]
[string->bytes/utf-8 (-String [(Un (-val #f) -Integer) -Integer -Integer] . ->opt . -Bytes)]
[string->bytes/locale (-String [(Un (-val #f) -Integer) -Integer -Integer] . ->opt . -Bytes)]
[string->bytes/latin-1 (-String [(Un (-val #f) -Integer) -Integer -Integer] . ->opt . -Bytes)]
[string-utf-8-length (-String [-Integer -Integer] . ->opt . -Nat)]
[bytes-utf-8-length (-Bytes [(Un (-val #f) -Char) -Integer -Integer] . ->opt . -Nat)]
[bytes-utf-8-ref (-Bytes [-Integer (Un (-val #f) -Char) -Integer -Integer] . ->opt . -Char)]
[bytes-utf-8-index (-Bytes [-Integer (Un (-val #f) -Char) -Integer -Integer] . ->opt . -Nat)]
[read-bytes-line (->opt [-Input-Port Sym] (Un -Bytes (-val eof)))]
[open-input-file (->key -Pathlike #:mode (Un (-val 'binary) (-val 'text)) #f -Input-Port)]
@ -578,11 +599,8 @@
[file-stream-buffer-mode (cl-> [(-Port) (Un (-val 'none) (-val 'line) (-val 'block) (-val #f))]
[(-Port (Un (-val 'none) (-val 'line) (-val 'block))) -Void])]
[file-position (-> -Port -Nat)]
[bytes->string/utf-8 (-> -Bytes -String)]
[string->bytes/utf-8 (-> -String -Bytes)]
[force (-poly (a) (-> (-Promise a) a))]
[bytes<? (->* (list -Bytes) -Bytes B)]
[regexp-replace*
(cl->* (-Pattern -String -String . -> . -String)
(-Pattern (Un -Bytes -String) (Un -Bytes -String) . -> . -Bytes))]