From 557fd0fca63ecd0f803dce302ce27ae2e5dc6b59 Mon Sep 17 00:00:00 2001 From: Carl Eastlund Date: Fri, 7 Jan 2011 18:47:51 -0500 Subject: [PATCH] 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). --- collects/planet/version.rkt | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) create mode 100644 collects/planet/version.rkt diff --git a/collects/planet/version.rkt b/collects/planet/version.rkt new file mode 100644 index 0000000000..8217cd78f0 --- /dev/null +++ b/collects/planet/version.rkt @@ -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))))])))