examples.pl -- Serve example files
Locate and serve files for the Examples menu as well as examples included from overview notebooks. The examples come from two sources:
- Prolog files in the file search path
examples
. Such files are distributed with SWISH. - Gitty files marked as
example
. Such files can be created by the users.
This module also makes the known examples available through swish_provides/1 for supporting conditional statements on example overview notebooks.
- md_eval:provides(?Term) is nondet[multifile]
- Make examples available through swish_provides/1. Can be used in
dynamic cells as, e.g.,:
:- if(swish_provides(example('chat80.pl',_,_))). ... :- endif.