diff --git a/bf/lang/reader.rkt b/bf/lang/reader.rkt index 969a404..d0f2166 100644 --- a/bf/lang/reader.rkt +++ b/bf/lang/reader.rkt @@ -1,9 +1,11 @@ #lang s-exp syntax/module-reader -(planet dyoo/whalesong/bf/language) ;; switched from (planet dyoo/bf/language) +#:language (lambda () + `(planet ,(this-package-version-symbol bf/language))) #:read my-read #:read-syntax my-read-syntax #:info my-get-info -(require "../parser.rkt") +(require "../parser.rkt" + planet/version) (define (my-read in) (syntax->datum (my-read-syntax #f in))) diff --git a/expand-out-images.rkt b/expand-out-images.rkt index d6fec98..3a68ffe 100644 --- a/expand-out-images.rkt +++ b/expand-out-images.rkt @@ -1,6 +1,7 @@ #lang racket/base -(require planet/version +(require racket/runtime-path + planet/version syntax/kerncase net/base64 (for-template (this-package-in lang/kernel) @@ -18,6 +19,8 @@ ;; ;; During the dynamic extent of expand-out-images, this will be defined ;; as the unique name for the image-url function in (planet dyoo/whalesong/image). +(define-runtime-path whalesong/image + "image.rkt") (define my-image-url (make-parameter #f)) @@ -39,16 +42,18 @@ (#%expression #,(on-expr #'expr)))] [(module id name-id (#%plain-module-begin module-level-form ...)) - (quasisyntax/loc stx - (module id name-id (#%plain-module-begin - ;; Kludge: I'm trying to get at the image-url - ;; function, but in a way that doesn't clash with the - ;; user's existing program. - (require (rename-in (planet dyoo/whalesong/image) - [image-url #,(my-image-url)])) - - #,@(map on-toplevel - (syntax->list #'(module-level-form ...))))))] + (with-syntax ([image-library-path + (path->string whalesong/image)]) + (quasisyntax/loc stx + (module id name-id (#%plain-module-begin + ;; Kludge: I'm trying to get at the image-url + ;; function, but in a way that doesn't clash with the + ;; user's existing program. + (require (rename-in (file image-library-path) + [image-url #,(my-image-url)])) + + #,@(map on-toplevel + (syntax->list #'(module-level-form ...)))))))] [(begin top-level-form ...) (quasisyntax/loc stx (begin #,@(map on-toplevel