This library provides useful predicates for managing developer tool and application options.
To load all entities in this library, load the
| ?- logtalk_load(options(loader)).
To test this library predicates, load the
| ?- logtalk_load(options(tester)).
options category is usually imported by the root object of the
developer tool or application. The importing object should define the
default_option/1 predicate and, if option type-checking is required,
valid_option/1 predicate. This library requires options to be
represented by compound terms but leaves otherwise to the clients the
The library also supports a user-defined
fix_option/2 predicate. An
usage example is when an option value can be a relative file path that
should be expanded before used. Another usage example would be
converting from a user-friendly option to a form more suitable for
internal processing. When a call to the
fails, the option is used as-is.