logtalk_load(File, Flags) logtalk_load(Files, Flags)
Compiles to disk and then loads to memory a source file or a list of source files using a list of compiler flags. The Logtalk source file name extension (by default, .lgt
) can be omitted. Compiler flags are represented as flag(value). This predicate can also be used to compile Prolog source files as Logtalk source code. When no recognized Logtalk or Prolog extension is specified, the compiler tries first to append a Logtalk source file extension and then a Prolog source file extension. If that fails, the compiler tries to use the file name as-is. For a description of the available compiler flags, please consult the User Manual. Source file paths can be absolute, relative to the current directory, or use library notation.
Note that only the errors related to problems in the predicate argument are listed below. This predicate fails when errors are found during compilation of a source file.
logtalk_load(@source_file_name, @list(compiler_flag)) logtalk_load(@list(source_file_name), @list(compiler_flag))
instantiation_error
instantiation_error
type_error(source_file_name, File)
existence_error(library, Library)
existence_error(file, File)
instantiation_error
type_error(list, Flags)
type_error(compiler_flag, Flag)
permission_error(modify, flag, Flag)
domain_error(flag_value, Flag+Value)
| ?- logtalk_load(list, []). | ?- logtalk_load(types(tree)). | ?- logtalk_load([listp, list], [source_data(off), portability(silent)]).
logtalk_compile/1
, logtalk_compile/2
, logtalk_load/1
, logtalk_make/0
, logtalk_make/1
logtalk_library_path/2