6 Package Definitions
(require denxi/pkgdef) | package: denxi |
A package definition is Racket code using the PACKAGE_DEFINITION_MODULE_LANG module language, namely denxi/pkgdef. Since Racket source code may be viewed as data, package definitions may appear in memory as syntax objects or lists.
When evaluated, a package definition performs a collection pass that applies all terms found in Package Definition Terms to empty-package. The result is a new package, provided using (provide pkg).
6.1 Package Definition Terms
syntax
(description string-fragment ...)
string-fragment : non-empty-string?
This form will gather all string fragments into a single string, so that you can divide up the message in source code.
Note that the string fragments are concatenated as-is, so take care with whitespace placement.
(description "This is a " "string that will" " appear as one line.")
syntax
(edition str)
str : non-empty-string?
syntax
(metadatum id value)
syntax
(name str)
str : non-empty-string?
syntax
(os-support os ...)
Each os must be a possible value of (system-type 'os).
syntax
(output name body ...)
name : non-empty-string?
Blank outputs like (output "name") are acceptable, but are only useful when expecting cached outputs.
syntax
(provider str)
str : non-empty-string?
syntax
(racket-versions supported ...)
supported = (min-version max-version) | exact-version
Each supported subform may be an inclusive Racket version range or an exact Racket version, e.g. (racket-versions ("6.0" "7.7.0.5") "5.4").
You may replace any version string with "*" to remove a bound. This way, (racket-versions ("6.0" "*")) represents all versions above and including 6.0. If the version string is not "*", it must be a valid-version?.
syntax
(revision-names str ...)
str : non-empty-string?
syntax
(revision-number num)
num : revision-number?
syntax
(tags t ...)
t : non-empty-string?
syntax
(url location)
location : url-string?
6.2 Reprovided Binding Index
denxi/pkgdef reprovides bindings from several other modules in the collection. They are indexed here for reference.
6.3 Static Operations for Package Definitions
(require denxi/pkgdef/static) | package: denxi |
procedure
(make-package-definition-datum [ #:id id] body) → package-definition-datum? id : symbol? = 'pkgdef body : list?
procedure
(get-package-definition-body datum) → list?
datum : package-definition-datum?
procedure
(get-static-exact-package-query pkgdef [ defaults]) → exact-package-query? pkgdef : bare-pkgdef?
defaults : package-query-defaults-implementation/c = default-package-query-defaults
procedure
(get-static-abbreviated-query pkgdef) → package-query?
pkgdef : bare-pkgdef?
procedure
(get-static-simple-string pkgdef id) → any/c
pkgdef : bare-pkgdef? id : symbol?
The return value is assumed to be a string, but might not be.
procedure
(get-static-inputs pkgdef) → list?
pkgdef : bare-pkgdef?
procedure
(get-static-simple-value pkgdef id default) → any/c
pkgdef : bare-pkgdef? id : symbol? default : any/c
procedure
(get-static-list-value pkgdef id default) → any/c
pkgdef : bare-pkgdef? id : symbol? default : any/c
procedure
(override-inputs pkgdef input-exprs) → bare-pkgdef?
pkgdef : bare-pkgdef? input-exprs : list?
If multiple expressions in input-exprs share a name, only the last occurrance will be used in the output.
procedure
(replace-input-expression pkgdef input-name replacement) → bare-pkgdef? pkgdef : bare-pkgdef? input-name : non-empty-string? replacement : any/c