All loading of source-files is achieved by load_files/2.
can be used to load Prolog code from non-files or even load entirely
different information, such as foreign files.
Load a single object. If this call succeeds, load_files/2
assumes the action has been taken care of. This hook is only called if Options
does not contain the
stream(Input) option. The hook must be
defined in the module
library(http_load) provides an example, loading
Prolog sources directly from an HTTP server.
This hook allows for processing ---structured--- comments encountered by
the compiler. The reader collects all comments found from the current
position to the end of the next term. It calls this hook providing a
list of Position-Comment in Comments,
the start-position of the next term in Pos and the next term
itself in Term. All positions are stream-position terms. This
hook is exploited by the documentation system. See
See also read_term/3.