GNU Dico Manual (split by node):   Section:   Chapter:FastBack: Modules   Up: Modules   FastForward: Interface   Contents: Table of ContentsIndex: Concept Index

5.5 Guile

Guile is an acronym for GNU’s Ubiquitous Intelligent Language for Extensions. It provides a Scheme interpreter conforming to the R5RS language specification and a number of convenience functions. For information about the language, refer to Revised(5) Report on the Algorithmic Language Scheme. For a detailed description of Guile and its features, see Overview in The Guile Reference Manual.

The guile module provides an interface to Guile that allows for writing GNU Dico modules in Scheme. The module is loaded using the following configuration file statement:

load-module mod-name {
   command "guile [options]"
           " init-script=script"
           " init-args=args"
           " init-fun=function";
}

The init-script parameter specifies the name of a Scheme source file to be loaded in order to initialize the module. The init-args parameter supplies additional arguments to the module. They will be accessible to the script via command-line function. This parameter is optional.

The init-fun parameter specifies the name of a function that will be invoked to perform initialization of the module and of particular databases. See Guile Initialization, for a description of initialization sequence. Optional arguments, options, are:

debug

Enable Guile debugging and stack traces.

nodebug

Disable Guile debugging and stack traces (default).

load-path=path

Append directories from path to the list of directories which should be searched for Scheme modules and libraries. The path must be a list of directory names, separated by colons.

This option modifies the value of Guile’s %load-path variable. See the section Configuration and Installation in the Guile Reference Manual.

Guile databases are declared using the following syntax:

database {
        name "dbname";
        handler "mod-name [options] cmdline";
}

where:

dbname

gives the name for this database,

mod-name

the name given to Guile module in load-module statement (see above),

options

options that override global settings given in the load-module statement. The following options are understood: init-script, init-args, and init-fun. Their meaning is the same as for load-module statement (see above), except that they affect only this particular database.

cmdline

the command line that will be passed to the Guile open-db callback function (see open-db).

GNU Dico Manual (split by node):   Section:   Chapter:FastBack: Modules   Up: Modules   FastForward: Interface   Contents: Table of ContentsIndex: Concept Index