From 5552a5c58c1d3e03f0ec0f9e8237d3714fcfac2b Mon Sep 17 00:00:00 2001 From: Matthew Flatt Date: Mon, 25 Jun 2007 08:47:02 +0000 Subject: [PATCH] doc work on modules, new big collection svn: r6732 original commit: efb592bd15892791a8bff3b9d203e905bcc40d6e --- collects/scribble/basic.ss | 2 +- collects/scribble/doclang.ss | 4 ++-- collects/scribble/eval.ss | 12 ++++++++++-- collects/scribble/manual.ss | 16 ++++++++++++++-- 4 files changed, 27 insertions(+), 7 deletions(-) diff --git a/collects/scribble/basic.ss b/collects/scribble/basic.ss index d43b716d..c9b9775d 100644 --- a/collects/scribble/basic.ss +++ b/collects/scribble/basic.ss @@ -1,5 +1,5 @@ -(module basic (lib "new-lambda.ss" "scribblings") +(module basic (lib "lang.ss" "big") (require "decode.ss" "struct.ss" "config.ss" diff --git a/collects/scribble/doclang.ss b/collects/scribble/doclang.ss index 0d6199fc..31eb64b0 100644 --- a/collects/scribble/doclang.ss +++ b/collects/scribble/doclang.ss @@ -1,11 +1,11 @@ -(module doclang (lib "new-lambda.ss" "scribblings") ; <--- temporary +(module doclang (lib "lang.ss" "big") (require "struct.ss" "decode.ss" (lib "kw.ss")) (require-for-syntax (lib "kerncase.ss" "syntax")) - (provide (all-from-except (lib "new-lambda.ss" "scribblings") #%module-begin) + (provide (all-from-except (lib "lang.ss" "big") #%module-begin) (rename *module-begin #%module-begin)) ;; Module wrapper ---------------------------------------- diff --git a/collects/scribble/eval.ss b/collects/scribble/eval.ss index 01a05770..92d95024 100644 --- a/collects/scribble/eval.ss +++ b/collects/scribble/eval.ss @@ -1,5 +1,5 @@ -(module eval (lib "new-lambda.ss" "scribblings") +(module eval (lib "lang.ss" "big") (require "manual.ss" "struct.ss" "scheme.ss" @@ -171,7 +171,15 @@ (define (do-plain-eval s catching-exns?) (parameterize ([current-namespace (current-int-namespace)]) - (call-with-values (lambda () ((scribble-eval-handler) catching-exns? (strip-comments s))) list))) + (call-with-values (lambda () + ((scribble-eval-handler) + catching-exns? + (let ([s (strip-comments s)]) + (syntax-case s (module) + [(module . _rest) + (syntax-object->datum s)] + [_else s])))) + list))) (define-syntax interaction-eval (syntax-rules () diff --git a/collects/scribble/manual.ss b/collects/scribble/manual.ss index 2204a638..5db07c20 100644 --- a/collects/scribble/manual.ss +++ b/collects/scribble/manual.ss @@ -1,5 +1,5 @@ -(module manual (lib "new-lambda.ss" "scribblings") +(module manual (lib "lang.ss" "big") (require "decode.ss" "struct.ss" "scheme.ss" @@ -182,7 +182,7 @@ (provide defproc defproc* defstruct defthing defform defform* defform/subs defform*/subs defform/none specform specform/subs - specsubform specspecsubform specsubform/inline + specsubform specsubform/subs specspecsubform specsubform/inline schemegrammar schemegrammar* var svar void-const undefined-const) @@ -294,6 +294,18 @@ (*specsubform 'spec #f '(lit ...) (lambda () (schemeblock0 spec)) null null (lambda () (list desc ...)))] [(_ spec desc ...) (*specsubform 'spec #f null (lambda () (schemeblock0 spec)) null null (lambda () (list desc ...)))])) + (define-syntax specsubform/subs + (syntax-rules () + [(_ #:literals (lit ...) spec ([non-term-id non-term-form ...] ...) desc ...) + (*specsubform 'spec #f '(lit ...) (lambda () (schemeblock0 spec)) + '((non-term-id non-term-form ...) ...) + (list (list (lambda () (scheme non-term-id)) + (lambda () (schemeblock0 non-term-form)) + ...) + ...) + (lambda () (list desc ...)))] + [(_ spec subs desc ...) + (specsubform/subs #:literals () spec subs desc ...)])) (define-syntax specspecsubform (syntax-rules () [(_ spec desc ...)