B.8 Hooks for loading files
AllApplicationManualNameSummaryHelp

  • Documentation
    • Reference manual
      • Hackers corner
        • Hooks for loading files
          • prolog_load_file/2
          • comment_hook/3
    • Packages
prolog_load_file(+Spec, +Options)
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 user.

This can be used to load from unusual places. For example, library library(http/http_load) loads Prolog directly from an HTTP server. It can also be used to load source in unusual forms, such as loading compressed files without decompressing them first. There is currently no example of that.