Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

trying to fix implicit refernces of planet, but something broke

  • Loading branch information...
commit f6ee6e4e22ada9b733cdb80e784d88128afe5f0a 1 parent c3946d7
Danny Yoo authored
Showing with 20 additions and 13 deletions.
  1. +4 −2 bf/lang/reader.rkt
  2. +16 −11 expand-out-images.rkt
View
6 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)))
View
27 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
Please sign in to comment.
Something went wrong with that request. Please try again.