From b349b4baa2da4b0d92ea33e3b3dcb21a18eeadee Mon Sep 17 00:00:00 2001 From: Eli Barzilay Date: Tue, 21 Oct 2008 19:52:40 +0000 Subject: [PATCH] look -- a let! svn: r12085 --- collects/typed-scheme/private/base-env.ss | 32 +++++++++++++---------- 1 file changed, 18 insertions(+), 14 deletions(-) diff --git a/collects/typed-scheme/private/base-env.ss b/collects/typed-scheme/private/base-env.ss index 39daf9aee9..e31e1f3ca4 100644 --- a/collects/typed-scheme/private/base-env.ss +++ b/collects/typed-scheme/private/base-env.ss @@ -267,20 +267,24 @@ ;; regexp stuff [regexp-match - (cl-> - [((*Un -String -Regexp) -String) (-opt (-lst (-opt -String)))] - [(-Pattern -String) (-opt (-lst (-opt (*Un -Bytes -String))))] - [(-Pattern -String N) (-opt (-lst (-opt (*Un -Bytes -String))))] - [(-Pattern -String N (-opt N)) (-opt (-lst (-opt (*Un -Bytes -String))))] - [(-Pattern -String N (-opt N) (-opt -Output-Port)) (-lst (-opt (*Un -Bytes -String)))] - [(-Pattern -String (-opt N) (-opt -Output-Port)) (-lst (-opt (*Un -Bytes -String)))] - [(-Pattern -String (-opt -Output-Port)) (-lst (-opt (*Un -Bytes -String)))] - [(-Pattern (*Un -Input-Port -Bytes)) (-opt (-lst (-opt -Bytes)))] - [(-Pattern (*Un -Input-Port -Bytes) N) (-opt (-lst (-opt -Bytes)))] - [(-Pattern (*Un -Input-Port -Bytes) N (-opt N)) (-opt (-lst (-opt -Bytes)))] - [(-Pattern (*Un -Input-Port -Bytes) (-opt N)) (-opt (-lst (-opt -Bytes)))] - [(-Pattern (*Un -Input-Port -Bytes) N (-opt N) (-opt -Output-Port)) (-lst (-opt -Bytes))])] - + (let ([?outp (-opt -Output-Port)] + [?N (-opt N)] + [optlist (lambda (t) (-opt (-lst (-opt t))))] + [-StrRx (*Un -String -Regexp -PRegexp)] + [-BtsRx (*Un -Bytes -Byte-Regexp -Byte-PRegexp)] + [-InpBts (*Un -Input-Port -Bytes)]) + (cl-> [(-StrRx -String ) (optlist -String)] + [(-StrRx -String N ) (optlist -String)] + [(-StrRx -String N ?N ) (optlist -String)] + [(-StrRx -String N ?N ?outp) (optlist -String)] + [(-BtsRx -String ) (optlist -Bytes)] + [(-BtsRx -String N ) (optlist -Bytes)] + [(-BtsRx -String N ?N ) (optlist -Bytes)] + [(-BtsRx -String N ?N ?outp) (optlist -Bytes)] + [(-Pattern -InpBts ) (optlist -Bytes)] + [(-Pattern -InpBts N ) (optlist -Bytes)] + [(-Pattern -InpBts N ?N ) (optlist -Bytes)] + [(-Pattern -InpBts N ?N ?outp) (optlist -Bytes)]))] [number->string (N . -> . -String)]