use some #lang lines

svn: r9173

original commit: 1a5cb7ed64be900f5f5073c5dc7429aaf232a656
This commit is contained in:
Eli Barzilay 2008-04-06 20:59:28 +00:00
parent 9f2c69105d
commit bc13980309
4 changed files with 82 additions and 87 deletions

View File

@ -1,4 +1,3 @@
(module reader mzscheme
(require (prefix doc: scribble/doc/reader))
(provide (rename doc:read read)
(rename doc:read-syntax read-syntax)))
#lang scheme/base
(require (prefix-in doc: scribble/doc/reader))
(provide (rename-out [doc:read read] [doc:read-syntax read-syntax]))

View File

@ -1,6 +1,5 @@
(module main scheme/base
#lang scheme/base
(define-syntax-rule (out)
(begin (require scribble/doclang)
(provide (all-from-out scribble/doclang))))
(out))
(out)

View File

@ -1,5 +1,5 @@
#lang scheme/base
(module reader scheme/base
(require (prefix-in scribble: "../reader.ss"))
(provide (rename-out [*read read])
@ -19,6 +19,4 @@
'page)]
[id 'doc])
`(module ,name scribble/doclang
(#%module-begin
,id ()
. ,body)))))
(#%module-begin ,id () . ,body))))

View File

@ -1,5 +1,5 @@
#lang scheme/base
(module doclang scheme/base
(require "struct.ss"
"decode.ss"
(for-syntax scheme/base
@ -23,9 +23,9 @@
(define m-id (decode (list . #,(reverse (syntax->list #'(expr ...))))))
(provide m-id))]
[(_ m-id exprs . body)
;; `body' probably starts with lots of string constants;
;; it's slow to trampoline on every string, so do them
;; in a batch here:
;; `body' probably starts with lots of string constants; it's
;; slow to trampoline on every string, so do them in a batch
;; here:
(let loop ([body #'body]
[accum null])
(syntax-case body ()
@ -37,10 +37,9 @@
#`(doc-begin m-id (accum ... . exprs)))]
[(body1 . body)
(with-syntax ([exprs (append accum #'exprs)])
(let ([expanded (local-expand #'body1
'module
(append
(kernel-form-identifier-list)
(let ([expanded (local-expand
#'body1 'module
(append (kernel-form-identifier-list)
(syntax->list #'(provide
require
#%provide
@ -60,4 +59,4 @@
#%provide))))
#`(begin #,expanded (doc-begin m-id exprs . body))]
[_else
#`(doc-begin m-id (#,expanded . exprs) . body)])))]))])))
#`(doc-begin m-id (#,expanded . exprs) . body)])))]))]))