1 (* Copyright (C) 2004-2005, HELM Team.
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.
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.
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.
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,
22 * For details, see the HELM World-Wide-Web page,
23 * http://helm.cs.unibo.it/
26 val absolute_path: string -> string
28 (** @return true if file is a (textual) proof script *)
29 val is_proof_script: string -> bool
31 (** @return true if file is a (binary) proof object *)
32 val is_proof_object: string -> bool
34 (** given a phrase, if it doesn't end with BuildTimeConf.phrase_sep, append
36 val append_phrase_sep: string -> string
38 val normalize_dir: string -> string (** add trailing "/" if missing *)
39 val strip_suffix: suffix:string -> string -> string
41 (** @return tl tail of a list starting at a given element
42 * @param eq equality to be used, defaults to physical equality (==)
44 val list_tl_at: ?equality:('a -> 'a -> bool) -> 'a -> 'a list -> 'a list
46 exception History_failure
50 class type ['a] history =
52 method add : 'a -> unit
53 method next : 'a (** @raise History_failure *)
54 method previous : 'a (** @raise History_failure *)
55 method load: 'a memento -> unit
56 method save: 'a memento
61 (** shell like history: new items added at the end of the history
62 * @param size maximum history size *)
63 class shell_history : int -> [string] history
65 (** browser like history: new items added at the current point of the history
66 * @param size maximum history size
67 * @param first element in history (this history is never empty) *)
68 class ['a] browser_history: ?memento:'a memento -> int -> 'a -> ['a] history
70 (** create a singleton from a given function. Given function is invoked the
71 * first time it gets called. Next invocation will return first value *)
72 val singleton: (unit -> 'a) -> (unit -> 'a)
74 (** given the base name of an image, returns its full path *)
75 val image_path: string -> string
77 (** 2>/dev/null, HLog = (fun _ -> ()) *)
78 val shutup: unit -> unit
80 (** outputs the preamble of a generated .ma file *)
81 val out_preamble: out_channel -> unit
86 (** {2 Global changes} *)
88 val observe_font_size: (int -> unit) -> unit
89 val get_current_font_size: unit -> int
90 val increase_font_size: unit -> unit
91 val decrease_font_size: unit -> unit
92 val reset_font_size: unit -> unit
94 (** CSC: these functions should completely disappear (bad design) *)
95 val set_gui: MatitaGuiTypes.gui -> unit
96 val get_gui: unit -> MatitaGuiTypes.gui