From f09604f097490dec00ea2a7c33545ccadb116565 Mon Sep 17 00:00:00 2001 From: Matthew Flatt Date: Wed, 30 Dec 2015 06:24:17 -0600 Subject: [PATCH] scribble/lp2: declare `doc` submodule with `module*` Using `module*` allows the documentation submodule to refer to the implementation module. --- scribble-doc/scribblings/scribble/lp.scrbl | 11 ++++++++++- scribble-lib/info.rkt | 2 +- scribble-lib/scribble/lp/lang/common.rkt | 2 +- 3 files changed, 12 insertions(+), 3 deletions(-) diff --git a/scribble-doc/scribblings/scribble/lp.scrbl b/scribble-doc/scribblings/scribble/lp.scrbl index da97b5a2..82fde863 100644 --- a/scribble-doc/scribblings/scribble/lp.scrbl +++ b/scribble-doc/scribblings/scribble/lp.scrbl @@ -62,7 +62,16 @@ submodule, which is recognized by tools such as @exec{raco scribble}. The content of the @racket[chunk] and @racket[CHUNK] forms is stitched together as the immediate content of the module. -@history[#:added "1.8"] +The @racket[chunk] and @racket[CHUNK] content is discovered by first +@racket[expand]ing the module as written. The content is collected +into a new module, and then the original module content is placed into +a @racket[doc] submodule that is expanded (so that the content is +effectively re-expanded). The @racketidfont{doc} submodule is declared +with @racket[module*]. + +@history[#:added "1.8" + #:changed "1.17" @elem{Declared the @racketidfont{doc} submodule with + @racket[module*] instead of @racket[module].}] @defform[(chunk id form ...)]{ diff --git a/scribble-lib/info.rkt b/scribble-lib/info.rkt index 838ce5af..4c79e431 100644 --- a/scribble-lib/info.rkt +++ b/scribble-lib/info.rkt @@ -23,4 +23,4 @@ (define pkg-authors '(mflatt eli)) -(define version "1.16") +(define version "1.17") diff --git a/scribble-lib/scribble/lp/lang/common.rkt b/scribble-lib/scribble/lp/lang/common.rkt index c6cdf835..85674ec3 100644 --- a/scribble-lib/scribble/lp/lang/common.rkt +++ b/scribble-lib/scribble/lp/lang/common.rkt @@ -101,7 +101,7 @@ (begin body0 . body)))]) (syntax-case submod () [(_ . rest) - (datum->syntax submod (cons #'module #'rest))]))) + (datum->syntax submod (cons #'module* #'rest))]))) '())))]))])) (define-syntax module-begin/plain (make-module-begin #f))