Next: , Previous: Doc Maintenance, Up: Miscellaneous Tools


13.3 Executable Modules

With very few exceptions, the programs described in this chapter are implemented as executable modules, each a regular Scheme module with some stylized packaging that additionally enables the code to be invoked from the shell, as a program in its own right. In this way, we bring together two modularity paradigms: pipes and plain text streams (the Unix way); and Scheme modules and objects (the Guile way).

(Do not be afraid of the word “paradigm”, especially since we are not attempting to “shift” anything, except perhaps ignorance and sloth.)

This section describes the characteristics of an executable module so that you may easily write some for your own fun and profit. The observant reader (of code) will also note that the programs that comprise the guile-tools set share additional features described in the next section (see HVQC-MAIN).

For a quick start, see the template PROGRAM program (see guile-tools PROGRAM). You can look at its source code with the shell command:

     guile-tools --source PROGRAM

For the following examples, we use PROGRAM literally, my-prog to indicate your program, (my modules my-prog) to indicate the module name of your program, and my-entry to indicate the entry point.

Programs must follow the executable module convention, documented here: