From 9618416c8ef5c5efd5709f83e7672fcd608b7ac8 Mon Sep 17 00:00:00 2001 From: Matthew Flatt Date: Sat, 29 Dec 2007 19:27:05 +0000 Subject: [PATCH] new 'file' collection to house file-format libraries svn: r8156 original commit: 643a19d01b39c8f702aa997ef40f2a16938b71b6 --- collects/scribble/manual.ss | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/collects/scribble/manual.ss b/collects/scribble/manual.ss index 6259e0d7..c390a9a3 100644 --- a/collects/scribble/manual.ss +++ b/collects/scribble/manual.ss @@ -531,6 +531,16 @@ [else #'#f])) + (define-syntax (result-contract stx) + (syntax-case stx () + [(_ c) + (if (string? (syntax-e #'c)) + (raise-syntax-error + 'defproc + "expected a result contract, found a string" + #'c) + #'(schemeblock0 c))])) + (define-syntax defproc (syntax-rules () [(_ (id arg ...) result desc ...) @@ -545,7 +555,7 @@ '[(id arg ...) ...] (list (list (lambda () (arg-contract arg)) ...) ...) (list (list (lambda () (arg-default arg)) ...) ...) - (list (lambda () (schemeblock0 result)) ...) + (list (lambda () (result-contract result)) ...) (lambda () (list desc ...)))])) (define-syntax defstruct (syntax-rules ()