► |  | raco: Racket Command-Line Tools

1 | raco make: Compiling Source to Bytecode
2 | raco link: Library Collection Links
3 | raco exe: Creating Stand-Alone Executables
4 | raco distribute: Sharing Stand-Alone Executables
5 | raco pack: Packing Library Collections
6 | raco unpack: Unpacking Library Collections
7 | raco planet: Automatic Package Distribution
8 | raco pkg: Package Management
9 | raco setup: Installation Management
10 | raco decompile: Decompiling Bytecode
11 | raco demod: Demodularizing Programs
12 | raco ctool: Working with C Code
13 | raco test: Run tests
14 | raco docs: Documentation Search
15 | raco expand: Macro Expansion
16 | raco scribble: Building Documentation
17 | Adding a raco Command

▼ | 9 | raco setup: Installation Management

9.1 | Running raco setup
9.2 | "info.rkt" File Format
9.3 | API for Installation
9.4 | API for Installing ".plt" Archives
9.5 | API for Finding Installation Directories
9.6 | API for Reading "info.rkt" Files
9.7 | API for Relative Paths
9.8 | API for Cross-References for Installed Manuals

On this page:

require

top ← prev up next →

#### 9.2`` "info.rkt" File Format

#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

=

(module info intotab-mod-path
decl
...)

intotab-mod-path |  | = |  | setup/infotab
|  | | |  | (lib "setup/infotab.ss")
|  | | |  | (lib "setup/infotab.rkt")
|  | | |  | (lib "infotab.rkt" "setup")
|  | | |  | (lib "infotab.ss" "setup")
decl |  | = |  | (define id info-expr)
|  | | |  | (require allowed-path)
info-expr |  | = |  | 'datum
|  | | |  | `datum
|  | | |  | (info-primitive info-expr ...)
|  | | |  | id
|  | | |  | string
|  | | |  | number
|  | | |  | boolean
|  | | |  | (string-constant identifier)
info-primitive |  | = |  | cons
|  | | |  | car
|  | | |  | cdr
|  | | |  | list
|  | | |  | list*
|  | | |  | reverse
|  | | |  | append
|  | | |  | string-append
|  | | |  | path->string
|  | | |  | build-path
|  | | |  | collection-path
|  | | |  | system-library-subpath
allowed-path |  | = |  | (lib "string-constant.ss" "string-constants")
|  | | |  | (lib "string-constants/string-constant.ss")
|  | | |  | string-constants/string-constant
|  | | |  | string-constants

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 setup/infotab
> (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 setup/infotab language.

See also get-info from setup/getinfo.

> > syntax

> > (require module-path)

Like require, but constrained to allowed-path as shown in the grammar above.
top ← prev up next →