From 86fc773b6e918caf382910039da89dab2648cbdd Mon Sep 17 00:00:00 2001 From: Robby Findler Date: Wed, 22 Dec 2004 17:32:47 +0000 Subject: [PATCH] . original commit: f5b55357cc2f98e5e3b00cb2843fafc54e7ee399 --- collects/mzlib/contract.ss | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/collects/mzlib/contract.ss b/collects/mzlib/contract.ss index 9c88d2e..f63b3c5 100644 --- a/collects/mzlib/contract.ss +++ b/collects/mzlib/contract.ss @@ -2689,7 +2689,8 @@ add struct contracts for immutable structs? (if (flat-contract? x) (flat-contract-predicate x) x))] - [pred + [contracts (map (lambda (x) (if (contract? x) x (flat-contract x))) fs)] + [pred (let loop ([pred (to-predicate (car fs))] [preds (cdr fs)]) (cond @@ -2699,7 +2700,7 @@ add struct contracts for immutable structs? (loop (let ([and/c-contract? (lambda (x) (and (pred x) (fst x)))]) and/c-contract?) (cdr preds)))]))]) - (flat-contract pred))] + (flat-named-contract (apply build-compound-type-name 'and/c contracts) pred))] [else (let* ([contracts (map (lambda (x) (if (contract? x) x (flat-contract x))) fs)] [contract/procs (map contract-proc contracts)])