SWI-Prolog has a mechanism for easy incorporation of community
extensions. See the pack
landing page for details and available packs. This section documents
the built-in predicates to attach packs. Predicates for creating,
registering and installing packs are provided by the library
- Attaches all packs in subdirectories of directories that are accessible
through the file search path (see absolute_file_name/3)
pack. The default for this search path is given below. See
app_data search path.
The predicate attach_packs/0
is called on startup of SWI-Prolog.
- Attach all packs in subdirectories of Directory. Same as
- Attach all packs in subdirectories of Directory. Options is
- Determines the order in which pack library directories are searched.
Default is to add new packages at the end (
first, new packages are added at the start.
- Determines what happens if a pack with the same name is already
attached. Default is
warning, which prints a warning and
ignores the new pack. Other options are
keep, which is like
but operates silently and
replace, which detaches the old
pack and attaches the new.
The predicate attach_packs/2
can be used to attach packages that are bundled with an application.