From acc990b094ba51828e400ad585e07e05db5546a8 Mon Sep 17 00:00:00 2001 From: Matthew Butterick Date: Wed, 19 Feb 2014 16:50:52 -0800 Subject: [PATCH] faster --- main-helper.rkt | 10 +++++----- main-preproc.rkt | 8 ++++---- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/main-helper.rkt b/main-helper.rkt index 53a40ed..d174862 100644 --- a/main-helper.rkt +++ b/main-helper.rkt @@ -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. diff --git a/main-preproc.rkt b/main-preproc.rkt index 0f1459c..29e3cc2 100644 --- a/main-preproc.rkt +++ b/main-preproc.rkt @@ -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 ...)