From c1b67062985d65162759b4b0eb2b4b8ec92832eb Mon Sep 17 00:00:00 2001 From: Noel Welsh Date: Tue, 28 Jul 2009 10:41:27 +0000 Subject: [PATCH] Add types for: - regexp? - pregexp? - byte-regexp? - byte-pregexp? - regexp - pregexp - byte-regexp - byte-pregexp - regexp-quote - read-bytes-line svn: r15595 original commit: 9c7584b8c80771bed4d2983617695c6564b719c5 --- collects/typed-scheme/private/base-env.ss | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/collects/typed-scheme/private/base-env.ss b/collects/typed-scheme/private/base-env.ss index 7c90c17d..06a844e4 100644 --- a/collects/typed-scheme/private/base-env.ss +++ b/collects/typed-scheme/private/base-env.ss @@ -297,6 +297,19 @@ [current-command-line-arguments (-Param (-vec -String) (-vec -String))] ;; regexp stuff +[regexp? (make-pred-ty -Regexp)] +[pregexp? (make-pred-ty -PRegexp)] +[byte-regexp? (make-pred-ty -Byte-Regexp)] +[byte-pregexp? (make-pred-ty -Byte-PRegexp)] +[regexp (-String . -> . -Regexp)] +[pregexp (-String . -> . -PRegexp)] +[byte-regexp (-Bytes . -> . -Byte-Regexp)] +[byte-pregexp (-Bytes . -> . -Byte-PRegexp)] +[regexp-quote (cl-> [(-String) -String] + [(-String -Boolean) -String] + [(-Bytes) -Bytes] + [(-Bytes -Boolean) -Bytes])] + [regexp-match (let ([?outp (-opt -Output-Port)] [?N (-opt N)] @@ -482,6 +495,9 @@ [bytes-append (->* (list -Bytes) -Bytes -Bytes)] [subbytes (cl-> [(-Bytes N) -Bytes] [(-Bytes N N) -Bytes])] [bytes-length (-> -Bytes N)] +[read-bytes-line (cl-> [() -Bytes] + [(-Input-Port) -Bytes] + [(-Input-Port Sym) -Bytes])] [open-input-file (->key -Pathlike #:mode (Un (-val 'binary) (-val 'text)) #f -Input-Port)] [close-input-port (-> -Input-Port -Void)] [close-output-port (-> -Output-Port -Void)]