Moved the types for some byte string operations to

base-env-indexing-abs.rkt.
This commit is contained in:
Vincent St-Amour 2010-06-21 17:49:16 -04:00
parent bc794b443c
commit eea31102b0
2 changed files with 20 additions and 15 deletions

View File

@ -137,6 +137,25 @@
[vector-copy! (-poly (a) ((-vec a) index-type (-vec a) [index-type index-type] . ->opt . -Void))]
[make-vector (-poly (a) (cl-> [(index-type) (-vec (Un -Nat a))]
[(index-type a) (-vec a)]))]
[bytes-ref (-> -Bytes index-type -Nat)]
[unsafe-bytes-ref (-> -Bytes index-type -Nat)]
[bytes-set! (-> -Bytes index-type index-type -Void)]
[unsafe-bytes-set! (-> -Bytes index-type index-type -Void)]
[subbytes (cl-> [(-Bytes index-type) -Bytes] [(-Bytes index-type index-type) -Bytes])]
[bytes-copy! (-Bytes index-type -Bytes [index-type index-type] . ->opt . -Void)]
[bytes-fill! (-> -Bytes index-type -Void)]
[bytes->string/utf-8 (-Bytes [(Un (-val #f) -Char) index-type index-type] . ->opt . -String)]
[bytes->string/locale (-Bytes [(Un (-val #f) -Char) index-type index-type] . ->opt . -String)]
[bytes->string/latin-1 (-Bytes [(Un (-val #f) -Char) index-type index-type] . ->opt . -String)]
[string->bytes/utf-8 (-String [(Un (-val #f) index-type) index-type index-type] . ->opt . -Bytes)]
[string->bytes/locale (-String [(Un (-val #f) index-type) index-type index-type] . ->opt . -Bytes)]
[string->bytes/latin-1 (-String [(Un (-val #f) index-type) index-type index-type] . ->opt . -Bytes)]
[string-utf-8-length (-String [index-type index-type] . ->opt . -Nat)]
[bytes-utf-8-length (-Bytes [(Un (-val #f) -Char) index-type index-type] . ->opt . -Nat)]
[bytes-utf-8-ref (-Bytes [index-type (Un (-val #f) -Char) index-type index-type] . ->opt . -Char)]
[bytes-utf-8-index (-Bytes [index-type (Un (-val #f) -Char) index-type index-type] . ->opt . -Nat)]
[peek-char
(cl->* [->opt [-Input-Port index-type] (Un -Char (-val eof))])]

View File

@ -564,30 +564,16 @@
[(-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)]
[unsafe-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)]