From 40b397c2cde7ecf475fc6d7babe8b343b92f215b Mon Sep 17 00:00:00 2001 From: Robby Findler Date: Thu, 3 Jun 2004 04:54:07 +0000 Subject: [PATCH] . original commit: ec495616ea844b239880ded00f8c6ab2a065669b --- collects/mzlib/contract.ss | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/collects/mzlib/contract.ss b/collects/mzlib/contract.ss index 41834be..715a055 100644 --- a/collects/mzlib/contract.ss +++ b/collects/mzlib/contract.ss @@ -26,7 +26,9 @@ add struct contracts for immutable structs? flat-contract? flat-contract flat-contract-predicate - flat-named-contract) + flat-named-contract + + contract-proc) (require-for-syntax mzscheme "list.ss" @@ -337,7 +339,7 @@ add struct contracts for immutable structs? (cdr l2) (+ i 1)))]))) - ;; extract-struct-info : syntax -> (union #f (list syntax syntax (listof syntax) ...)) + ;; extract-parent-struct-info : syntax -> (union #f (list syntax syntax (listof syntax) ...)) (define (extract-parent-struct-info stx) (syntax-case stx () [(a b) @@ -347,7 +349,7 @@ add struct contracts for immutable structs? (raise-syntax-error 'provide/contract "expected a struct name" provide-stx - (syntax a))))] + (syntax b))))] [a #f])) ;; build-constructor-contract : syntax (listof syntax) syntax -> syntax @@ -2913,10 +2915,10 @@ add struct contracts for immutable structs? 'type-name v))))))))))])) - (define cons-immutable/c (*-immutable/c pair? cons (#f car cdr) immutable-cons cons-immutable/c)) - (define box-immutable/c (*-immutable/c box? box (#f unbox) immutable-box box-immutable/c)) + (define cons-immutable/c (*-immutable/c pair? cons-immutable (#f car cdr) immutable-cons cons-immutable/c)) + (define box-immutable/c (*-immutable/c box? box-immutable (#f unbox) immutable-box box-immutable/c)) (define vector-immutable/c (*-immutable/c vector? - vector + vector-immutable (#t (lambda (v i) (vector-ref v i))) (lambda (n v) (= n (vector-length v))) immutable-vector