Next: , Up: API Reference   [Contents][Index]


3.1 Modules

Grip functionality that extends Guile’s module system. The module is loaded by entering the following:

(use-modules (grip module))

Procedures, Macros and Syntax

re-export-public-interface
module-g-export!
g-export

Procedures, Macros and Syntax

Macro: re-export-public-interface mod1 mod2 mod3 …

Returns nothing.

Re-export the public interface of mod1, mod2, mod3

Procedure: module-g-export! module names

Returns nothing.

Add all names (which must be a list of symbols or pairs of symbols) to the list of exported or re-exported bindings of the current module. name is a pair, its car gives the name of the variable as seen by the current module and its cdr specifies a name for the binding in the current module’s public interface. Bindings that are re-exported are those imported by the current module from some other module.

Note: module-g-export! stands for ‘module goops export!’ and should only be used for getters, setters, accessors and methods. It is provided so that users may ‘automatically’ either add method(s) to imported generic functions and re-export the generic function name, or create and export a new name for the generic function hosting the current module method(s), when the name is not exported by any imported module.

Syntax: g-export variable …

Returns nothing.

Add all variables (which must be symbols or pairs of symbols) to the list of exported or re-exported bindings of the current module. If variable is a pair, its car gives the name of the variable as seen by the current module and its cdr specifies a name for the binding in the current module’s public interface. Bindings that are re-exported are those imported by the current module from some other module.

g-export works both at compile-time and run-time.

Note: g-export stands for ‘goops export’ and should only be used for getters, setters, accessors and methods. It is provided so that users may ‘automatically’ either add method(s) to imported generic functions and re-export the generic function name, or create and export a new name for the generic function hosting the current module method(s), when the name is not exported by any imported module.


Next: , Up: API Reference   [Contents][Index]