From e5ed38fedc53a1c45262537bd300553970aadfb8 Mon Sep 17 00:00:00 2001 From: Stevie Strickland Date: Thu, 11 Sep 2008 16:52:08 +0000 Subject: [PATCH] This wasn't used in define/contract either. svn: r11646 --- collects/scheme/private/contract.ss | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/collects/scheme/private/contract.ss b/collects/scheme/private/contract.ss index 3dba683fd6..0070652af1 100644 --- a/collects/scheme/private/contract.ss +++ b/collects/scheme/private/contract.ss @@ -50,19 +50,6 @@ improve method arity mismatch contract violation error messages? ; ; ; -;; lookup-struct-info : syntax -> (union #f (list syntax syntax (listof syntax) ...)) -(define-for-syntax (lookup-struct-info stx provide-stx) - (let ([id (syntax-case stx () - [(a b) (syntax a)] - [_ stx])]) - (let ([v (syntax-local-value id (λ () #f))]) - (if (struct-info? v) - (extract-struct-info v) - (raise-syntax-error 'provide/contract - "expected a struct name" - provide-stx - id))))) - (define-for-syntax (make-define/contract-transformer contract-id id) (make-set!-transformer (λ (stx) @@ -219,6 +206,19 @@ improve method arity mismatch contract violation error messages? ; ; +;; lookup-struct-info : syntax -> (union #f (list syntax syntax (listof syntax) ...)) +(define-for-syntax (lookup-struct-info stx provide-stx) + (let ([id (syntax-case stx () + [(a b) (syntax a)] + [_ stx])]) + (let ([v (syntax-local-value id (λ () #f))]) + (if (struct-info? v) + (extract-struct-info v) + (raise-syntax-error 'provide/contract + "expected a struct name" + provide-stx + id))))) + ;; id->contract-src-info : identifier -> syntax ;; constructs the last argument to the -contract, given an identifier (define-for-syntax (id->contract-src-info id)