Did you know ... Search Documentation:
dialect.pl -- Support multiple Prolog dialects
PublicShow source

The idea for this predicate was raised by Vitor Santos Costa in a discussion to reach as a portability framework between SWI-Prolog and YAP.

This library defines :- expects_dialect/1, telling the system for which Prolog dialect was written, as well as useful tests in conditional compilation:

- Jan Wielemaker
- Vitor Santos Costa
See also
- if/1, require/1, term_expansion/2, goal_expansion/2.
Source expects_dialect(+Dialect:atom) is det
Tell Prolog all subsequent code to the end of the file or the next :- expects_dialect/1 directive is written for the indicated Dialect. The current dialect is available through prolog_load_context/2.
To be done
- Should we setup the dialect module only as autoload for the current module?
Source exists_source(+Source) is semidet
True if Source (a term valid for load_files/2) exists. Fails without error if this is not the case. The predicate is intended to be used with :- if, as in the example below. See also source_exports/2.
:- if(exists_source(library(error))).
:- use_module_library(error).
:- endif.
Source source_exports(+Source, +Export) is semidet
source_exports(+Source, -Export) is nondet
True if Source exports Export. Fails without error if this is not the case. See also exists_source/1.
To be done
- Should we also allow for source_exports(-Source, +Export)?