This module allows SWISH programs to include other programs from the shared gitty store. It realises this using the following steps:
- Use term_expansion/2 to rewrite the include to fetch the data from the gitty store.
- Declare this specific version of include safe.
- Adjust the colourization to indicate the shared file as existing.
- Hook the Prolog cross-referencer to process the included file.
We allow for hierarchical and circular includes.
- prolog:xref_source_identifier(+Src, -Id) is semidet[multifile]
- prolog:xref_open_source(+File, -Stream) is det[multifile]
- prolog:xref_source_time(+File, -Modified) is det[multifile]
- Map swish://file to a file from the gitty store.
- prolog:xref_source_file(+Term, -Path, +Options)[multifile]
- Deal with the above expansion for :-
include(program)to support the cross-referencer.