This module computes file dependencies for modules as a set of
- file_autoload_directives(+File, -Directives, +Options) is det
- Compute the dependencies as autoload/2 directives. Options
false), only generate directives
for called predicates that are not already imported.
- Directive to use for adding dependencies. Defined
- (Default). This uses use_module/2 for files that
cannot be imported using use_autoload/2.
- This uses use_module/1 for files that cannot be
imported using use_autoload/1.
- Updated an existing set of directives. The returned
set of Directive starts with copies of Old. If a
member of Old is autoload/2 or use_module/2, new
dependencies are added at the end of this list.
New dependent files are added after the modified
copies of Old. Declared dependencies are never
removed, even if no proof of usage is found.
directive(+Directive) option is provided a
default is determined from the given directives.
- undefined(+File, -Callable, +Options)[private]
- Callable is called in File, but no definition can be found. If
File is not a module file we consider other files that are not
- included_if_defined(+Condition, +Callable) is semidet[private]
- available(+File, +Callable, -HowDefined, +Options)[private]
- True if Callable is available in File.
- True if Callable is a built-in
- defined(?File, ?Callable)[private]
- True if Callable is defined in File and not imported.
- directives(+FileAndHeads, -Directives, +Options) is det[private]
- Assemble the final set of directives. Uses the option
- update_style(+OldDirectives, +Options0, -Options)[private]
- Determine the directive to use for new dependencies. This
establishes a default based on existing dependencies.
- directive(+Options, +FileAndHeads, -Directive)[private]
- Create a directive to import Heads from File.
- file_auto_import(+File, +Options)
- Update the autoload/2 directives for File. This predicate modifies
the file in place. Defined options are:
- Create a backup of File using Extension.
- rewrite_term(+In, -Keep, -OutList, +Options) is semidet[private]