This module analyses a Prolog pack without loading it.
- pack_analysis(+Pack, -Results)
- Result is the analysis result for Pack. Results is a list,
containing the following elements:
- size(SizeBytes)
- Summed size of all files in Pack. Always exactly one.
- files(Files)
- List of files in the pack. Each file is represented by a
term
file(Name, SizeBytes)
.
- prolog_source(File, Size, Module, Exports, Extra)
- One for each Prolog file in pack. If the file is not a module
file, Module is unified to
-
and Exports is []. Each
member of Exports is a term export(PI, Info)
, where Info
is a list with additional properties. Currently defined
Info terms are:
Extra is reserved for additional information. Currently defines:
- xref_pack(+Pack) is det
- Run the cross-referencer on all Prolog files inside pack.
- xref_pack_file(+Pack, +File) is det
- Run the cross-referencer on File inside Pack.
- pack_open_entry(+Pack, +Entry, -Stream) is det
- Open an entry in the Pack for reading. The entry must be closed
with close/1.
- pack_members(+Pack, -Members:list) is det
- Members is a list of
file(File,Size)
that represent the files in
Pack. Pack is either a git repository, a directory holding files
or an archive.
- prolog:xref_open_source(+Id, -Stream) is semidet[multifile]
- If Id refers to a known Prolog pack, open the pack entry. A
pack-file identifier is the path-name of the archive or pack
directory, followed by the entry in the pack.
- prolog:xref_source_identifier(+Path, -Id) is semidet[multifile]
- prolog:xref_source_file(+Spec, -SourceID, +Options) is semidet[multifile]
Undocumented predicates
The following predicates are exported, but not or incorrectly documented.
- pack_prolog_entry(Arg1)