1/* Part of ClioPatria SeRQL and SPARQL server 2 3 Author: Jan Wielemaker 4 E-mail: J.Wielemaker@vu.nl 5 WWW: http://www.swi-prolog.org 6 Copyright (c) 2010-2018, University of Amsterdam, 7 VU University Amsterdam 8 All rights reserved. 9 10 Redistribution and use in source and binary forms, with or without 11 modification, are permitted provided that the following conditions 12 are met: 13 14 1. Redistributions of source code must retain the above copyright 15 notice, this list of conditions and the following disclaimer. 16 17 2. Redistributions in binary form must reproduce the above copyright 18 notice, this list of conditions and the following disclaimer in 19 the documentation and/or other materials provided with the 20 distribution. 21 22 THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 23 "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 24 LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS 25 FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE 26 COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, 27 INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, 28 BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 29 LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER 30 CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 31 LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN 32 ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 33 POSSIBILITY OF SUCH DAMAGE. 34*/ 35 36:- module(bundle, 37 [ use_bundle/1 38 ]).
50:- multifile 51 user:file_search_path/2, 52 system:term_expansion/2, 53 emacs_prolog_colours:goal_colours/2. 54 55user:file_search_path(bundle, library(bundles)).
use_module(Library)
. calls.62use_bundle(Package) :- 63 throw(error(context_error(nodirective, use_bundle(Package)), _)). 64 65systemterm_expansion((:- use_bundle(Package)), 66 (:- include(bundle(Package)))). 67 68 69emacs_prolog_colours:goal_colours(use_bundle(Pkg), 70 built_in - [ Class ]) :- 71 ( absolute_file_name(bundle(Pkg), File, 72 [ file_type(prolog), 73 file_errors(fail) 74 ]) 75 -> Class = file(File) 76 ; Class = nofile 77 )
Import bundles
This module provides an interface that is similar to the Ciao package interface. Bundles are Prolog files that are included. Typically, they contain multiple use_module/1 calls.
At least for now, the system has been named bundle because the name package is already used as a package of software. */