pull/9/head
Matthew Butterick 11 years ago
parent 776a9f90e8
commit acc990b094

@ -8,7 +8,7 @@
(define-for-syntax (put-file-in-require-form file)
`(file ,(path->string file)))
(define-for-syntax (make-require-extras-syntax stx #:provide? [provide? #f])
(define-for-syntax (do-project-require-file-syntax stx #:provide? [provide? #f])
(define project-require-files (get-project-require-files))
(if project-require-files
(let ([files-in-require-form (map put-file-in-require-form project-require-files)])
@ -20,11 +20,11 @@
; if no files to import, do nothing
#'(begin)))
(define-syntax (require-and-provide-extras stx)
(make-require-extras-syntax stx #:provide? #t))
(define-syntax (require-and-provide-project-require-files stx)
(do-project-require-file-syntax stx #:provide? #t))
(define-syntax (require-extras stx)
(make-require-extras-syntax stx))
(define-syntax (require-project-require-files stx)
(do-project-require-file-syntax stx))
;; here = path of this file, relative to current directory.

@ -1,16 +1,16 @@
#lang racket/base
(provide (except-out (all-from-out racket/base) #%module-begin)
(rename-out [module-begin #%module-begin]))
(rename-out [replacement-module-begin #%module-begin]))
(define-syntax-rule (module-begin body ...)
(define-syntax-rule (replacement-module-begin body ...)
(#%module-begin
(module inner pollen/lang/doclang_raw
main
(λ(x) (apply string-append (cdr x))) ;; chop first linebreak with cdr
()
(require pollen/main-helper pollen/top)
(require-and-provide-extras)
(require pollen/main-helper)
(require-project-require-files)
(provide (all-defined-out))
body ...)

Loading…
Cancel
Save