6.4 "info.rkt" File Format
| #lang info | package: base |
| #lang setup/infotab | |
In each collection, a special module file "info.rkt" provides general information about a collection for use by various tools. For example, an "info.rkt" file specifies how to build the documentation for a collection, and it lists plug-in tools for DrRacket or commands for raco that the collection provides.
Although an "info.rkt" file contains a module declaration, the declaration has a highly constrained form. It must match the following grammar of info-module:
| info-module | = |
| |||||
| info-mod-path | = | info | |||||
| | | setup/infotab | ||||||
| | | (lib "info/main.rkt") | ||||||
| | | (lib "setup/infotab.ss") | ||||||
| | | (lib "setup/infotab.rkt") | ||||||
| | | (lib "main.rkt" "info") | ||||||
| | | (lib "infotab.rkt" "setup") | ||||||
| | | (lib "infotab.ss" "setup") | ||||||
| decl | = | (define id info-expr) | |||||
| info-expr | = | (quote datum) | |||||
| | | (quasiquote datum) | ||||||
| | | (info-primitive info-expr ...) | ||||||
| | | id | ||||||
| | | string | ||||||
| | | number | ||||||
| | | boolean | ||||||
| info-primitive | = | cons | |||||
| | | car | ||||||
| | | cdr | ||||||
| | | list | ||||||
| | | list* | ||||||
| | | reverse | ||||||
| | | append | ||||||
| | | string-append | ||||||
| | | make-immutable-hash | ||||||
| | | hash | ||||||
| | | hash-set | ||||||
| | | hash-set* | ||||||
| | | hash-remove | ||||||
| | | hash-clear | ||||||
| | | hash-update | ||||||
| | | path->string | ||||||
| | | build-path | ||||||
| | | collection-path | ||||||
| | | system-library-subpath |
For example, the following declaration could be the "info.rkt" library of the "games" collection. It contains definitions for three info tags, name, gracket-launcher-libraries, and gracket-launcher-names.
#lang info (define name "Games") (define gracket-launcher-libraries '("main.rkt")) (define gracket-launcher-names '("PLT Games"))
As illustrated in this example, an "info.rkt" file can use #lang notation, but only with the info (or setup/infotab) language.
See also get-info from setup/getinfo.