Moved this-package-version-symbol from unstable/planet to planet/version.

Could not put it in planet/util because it depends on planet/util at phase 1.
Re-exported the other "this-package" macros from planet/version.
Modified this-package-in to take multiple suffix identifiers and to treat the
suffix "main" specially, and generate (planet owner/name:X:Y) instead of
(planet owner/name:X:Y/main).
This commit is contained in:
Carl Eastlund 2011-01-07 18:47:51 -05:00
parent debad064e7
commit 557fd0fca6

View File

@ -0,0 +1,26 @@
#lang racket/base
(provide this-package-version
this-package-version-name
this-package-version-owner
this-package-version-maj
this-package-version-min
this-package-version-symbol
this-package-in)
(require
planet/util
(for-syntax
racket/base
racket/require-transform
syntax/parse
planet/syntax))
(define-syntax this-package-in
(make-require-transformer
(syntax-parser
[(~and src (_ (~or (~datum main) suffix:id) ...))
(expand-import
#`(combine-in
#,@(for/list ([suf (in-list (attribute suffix))])
(make-planet-require-spec #'src suf))))])))