let images_dir = runtime_base_dir ^ "/icons"
let gtkrc_file = runtime_base_dir ^ "/matita.gtkrc"
let lang_file = runtime_base_dir ^ "/matita.lang"
+let script_template = runtime_base_dir ^ "/matita.ma.templ"
--- /dev/null
+(**************************************************************************)
+(* ___ *)
+(* ||M|| *)
+(* ||A|| A project by Andrea Asperti *)
+(* ||T|| *)
+(* ||I|| Developers: *)
+(* ||T|| The HELM team. *)
+(* ||A|| http://helm.cs.unibo.it *)
+(* \ / *)
+(* \ / This file is distributed under the terms of the *)
+(* v GNU General Public License Version 2 *)
+(* *)
+(**************************************************************************)
+
+set "baseuri" "cic:/matita/tests/<fill here>".
+
| None -> ()
with MatitaTypes.Cancel -> ()
in
- let newScript () = (s ())#reset (); disableSave () in
+ let newScript () =
+ (s ())#reset ();
+ (s ())#template ();
+ disableSave ()
+ in
let cursor () =
source_buffer#place_cursor
(source_buffer#get_iter_at_mark (`NAME "locked"))
else
begin
(match script_fname with
- | None -> clean_current_baseuri status
+ | None -> clean_current_baseuri status; GMain.Main.quit ()
| Some fname ->
try
ask_and_save_moo_if_needed main#toplevel fname status;
set_star self#ppFilename true
else
set_star self#ppFilename false));
- self#reset ()
+ self#reset ();
+ self#template ();
+ buffer#set_modified false
val mutable statements = []; (** executed statements *)
val mutable history = [ init ];
buffer#delete ~start:buffer#start_iter ~stop:buffer#end_iter;
self#notify
+ method template () =
+ let template = MatitaMisc.input_file BuildTimeConf.script_template in
+ buffer#insert ~iter:(buffer#get_iter `START) template
+
method goto (pos: [`Top | `Bottom | `Cursor]) () =
match pos with
| `Top -> self#goto_top; self#notify
method retract : unit -> unit
method goto: [`Top | `Bottom | `Cursor] -> unit -> unit
method reset: unit -> unit
+ method template: unit -> unit
(** {2 Load/save} *)
--- /dev/null
+(**************************************************************************)
+(* ___ *)
+(* ||M|| *)
+(* ||A|| A project by Andrea Asperti *)
+(* ||T|| *)
+(* ||I|| Developers: *)
+(* ||T|| The HELM team. *)
+(* ||A|| http://helm.cs.unibo.it *)
+(* \ / *)
+(* \ / This file is distributed under the terms of the *)
+(* v GNU General Public License Version 2 *)
+(* *)
+(**************************************************************************)
+
+set "baseuri" "cic:/matita/tests/absurd/".
+alias num (instance 0) = "natural number".
+alias symbol "eq" (instance 0) = "leibnitz's equality".
+alias id "not" = "cic:/Coq/Init/Logic/not.con".
+
+
+
+theorem stupid : \forall a:Prop. a \to not a \to 0 = 1.
+intros.
+absurd a.
+assumption.
+assumption.
+qed.
\ No newline at end of file