The following options are currently supported:
false), indicate that this load is a demand load. This implies that, depending on the setting of the Prolog flag verbose_autoload, the load action is printed at level
silent. See also print_message/2 and current_prolog_flag/2.
- Indicate that the loaded file is derived from File. Used by make/0 to time-check and load the original file rather than the derived file.
- Load Files with enhanced compatibility with the target Prolog system identified by Dialect. See expects_dialect/1 and section C for details.
- Specify the way characters are encoded in the file. Default is taken from the Prolog flag encoding. See section 2.18.1 for details.
true, run the filenames through expand_file_name/2 and load the returned files. Default is
false, except for consult/1 which is intended for interactive use. Flexible location of files is defined by file_search_path/2.
- Used to specify the file format if data is loaded from a stream using
stream(Stream)option. Default is
source, loading Prolog source text. If
qlf, load QLF data (see qcompile/1).
- Load the file only if the specified condition is satisfied. The value
trueloads the file unconditionally,
changedloads the file if it was not loaded before or has been modified since it was loaded the last time, and
not_loadedloads the file if it was not loaded before.
- Specify what to import from the loaded module. The default for
all. Import is passed from the second argument of use_module/2. Traditionally it is a list of predicate indicators to import. As part of the SWI-Prolog/YAP integration, we also support Pred as Name to import a predicate under another name. Finally, Import can be the term
except(Exceptions), where Exceptions is a list of predicate indicators that specify predicates that are not imported or Pred as Name terms to denote renamed predicates. See also reexport/2 and use_module/2.bugName/Arity as NewName is currently implemented using a link clause. This harms efficiency and does not allow for querying the relation through predicate_property/2.
If Import equals
all, all operators are imported as well. Otherwise, operators are not imported. Operators can be imported selectively by adding terms
op(Pri,Assoc,Name)to the Import list. If such a term is encountered, all exported operators that unify with this term are imported. Typically, this construct will be used with all arguments unbound to import all operators or with only Name bound to import a particular operator.
- Claim that the source was loaded at TimeStamp without
checking the source. This option is intended to be used together with
stream(Input)option, for example after extracting the time from an HTTP server or database.
true, raise an error if the file is not a module file. Used by use_module/[1,2].
- How to deal with quick-load-file compilation by qcompile/1.
- Default. Do not use qcompile unless called explicitly.
- Use qcompile for all writeable files. See comment below.
- Use qcompile if the file is `large'. Currently, files larger than 100 Kbytes are considered large.
- If this load_file/2
appears in a directive of a file that is compiled into Quick Load Format
the contents of the argument files are included in the
.qlffile instead of the loading directive.
If this option is not present, it uses the value of the Prolog flag qcompile as default.
- Defines what to do if a file is loaded that provides a module that is
already loaded from another file. Action is one of
false(default), which prints an error and refuses to load the file, or
true, which uses unload_file/1 on the old file and then proceeds loading the new file. Finally, there is
ask, which starts interaction with the user.
askis only provided if user_input is associated with a terminal.
truere-export the imported predicate. Used by reexport/1 and reexport/2.
false, do not register the load location and options. This option is used by make/0 and load_hotfixes/1 to avoid polluting the load-context database. See source_file_property/2.
true, load the file without printing a message. The specified value is the default for all files loaded as a result of loading the specified files. This option writes the Prolog flag verbose_load with the negation of Bool.
- This SWI-Prolog extension compiles the data from the stream
Input. If this option is used, Files must be a
single atom which is used to identify the source location of the loaded
clauses as well as to remove all clauses if the data is reconsulted.
This option is added to allow compiling from non-file locations such as databases, the web, the user (see consult/1) or other servers. It can be combined with
format(qlf)to load QLF data from a stream.