![Click to show exports only All predicates](/swish/pldoc/res/private.png)
make.pl -- Reload modified source files
This module provides the SWI-Prolog `make' facility that synchronises Prolog internal database after loaded files have been edited.
make
- Reload all source files that have been changed since they were
loaded. This predicate peforms the following steps:
- Compute the set of files that need to be reloaded.
- Call the hook prolog:
make_hook(before, Files)
- Reload the files
- Call the hook prolog:
make_hook(after, Files)
- If (4) fails, call list_undefined/0.
The hooks are called with an empty list if no files need reloading.
modified_file(-File) is nondet[private]
- True when File is modified after it has been loaded.
(*) A file is considered modified if the modification time of the file is at least 1ms later that when it was loaded. The 1ms relaxed matching is used to compensate for inconsistent float handling and possible timing jitter.
make_reload_file(File)
- Reload file into the proper module.
- prolog:make_hook(+When, +Files) is semidet[multifile]
- This hook is called by make/0. It is called with the following
values for When:
- before
- The hook is called before reloading starts. The default action is to do nothing.
- after
- The hook is called after reloading completed. The default
action is to call list_undefined/1 as:
list_undefined([scan(local)]).
The hook can be used to change program validation, stop or restart services, etc.