logtalk_compile/2

Description

logtalk_compile(File, Flags)
logtalk_compile(Files, Flags)

Compiles to disk a source file or a list of source files using a list of flag values. The Logtalk file name extension (by default, .lgt) must be omitted. Note that the first argument is a file name or a list of file names, not file paths. In other words, the files must exist in the current working directory, unless library notation is used.

For a description of the available compiler flags, please consult the User Manual.

Note that only the errors related to problems in the predicate arguments are listed below. Other exceptions may be thrown by the compiler if any of the compiled entities contain syntax errors.

Template and modes

logtalk_compile(@source_file_names, @list)

Errors

File is a variable:
instantiation_error
Files is a variable or a list with an element which is a variable:
instantiation_error
File, or an element File of the Files list, is neither a variable nor an entity file name nor a library entity file name:
type_error(source_file_name, File)
File, or an element File of the Files list, is a compound term but not a library entity file name:
type_error(library_source_file_name, Entity)
File or an element File of the Files list does not exist in the current working directory or in the specified library directory:
existence_error(file, File)
Entity library does not exist:
existence_error(library, Library)
Flags is a variable:
instantiation_error
Flags is neither a variable nor a proper list:
type_error(list, Flags)
An element Flag of the Flags list is not valid:
type_error(compiler_flag, Flag)

Examples

| ?- logtalk_compile(list, []).

| ?- logtalk_compile(types(tree), [xmlspec(xsd)]).

| ?- logtalk_compile([listp, list], [xml(off), plredf(warning)]).