]> matita.cs.unibo.it Git - helm.git/blob - matita/components/library/librarian.mli
Some bugs fixed (and some still open) in recursive compilation of files:
[helm.git] / matita / components / library / librarian.mli
1 (* Copyright (C) 2004-2008, HELM Team.
2  * 
3  * This file is part of HELM, an Hypertextual, Electronic
4  * Library of Mathematics, developed at the Computer Science
5  * Department, University of Bologna, Italy.
6  * 
7  * HELM is free software; you can redistribute it and/or
8  * modify it under the terms of the GNU General Public License
9  * as published by the Free Software Foundation; either version 2
10  * of the License, or (at your option) any later version.
11  * 
12  * HELM is distributed in the hope that it will be useful,
13  * but WITHOUT ANY WARRANTY; without even the implied warranty of
14  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
15  * GNU General Public License for more details.
16  *
17  * You should have received a copy of the GNU General Public License
18  * along with HELM; if not, write to the Free Software
19  * Foundation, Inc., 59 Temple Place - Suite 330, Boston,
20  * MA  02111-1307, USA.
21  * 
22  * For details, see the HELM World-Wide-Web page,
23  * http://helm.cs.unibo.it/
24  *)
25
26 exception NoRootFor of string
27 exception FileNotFound of string
28
29 (* make a relative path absolute *)
30 val absolutize: string -> string 
31
32 (* a root file is a text, line oriented, file containing pairs separated by
33  * the '=' character. Example:
34  *
35  *  baseuri = cic:/foo/bar
36  *  include_paths = ../baz ../../pippo
37  *
38  * spaces at the end/begin of the line and around '=' are ignored,
39  * multiple spaces in the middle of an item are shrinked to one.
40  *)
41 val load_root_file: string -> (string*string) list
42
43 (* baseuri_of_script ?(inc:REG[matita.includes]) fname 
44  *   -> 
45  * root, buri, fullpath, rootrelativepath
46  * sample: baseuri_of_script a.ma -> /home/pippo/devel/, cic:/matita/a,
47  * /home/pippo/devel/a.ma, a.ma *)
48 val baseuri_of_script: 
49   include_paths:string list -> string -> string * string * string * string
50
51 (* given a baseuri and a file name (relative to its root)
52  * returns a baseuri:
53  *    mk_baseuri "cic:/matita" "nat/plus.ma" -> "cic:/matita/nat/plus"
54  *)    
55 val mk_baseuri: string -> string -> string
56
57 (* finds all the roots files in the specified dir, roots are
58  * text files, readable by the user named 'root'
59  *)
60 val find_roots_in_dir: string -> string list
61
62 (* true if the argunent starts with a uri scheme prefix *)
63 val is_uri: string -> bool