]> matita.cs.unibo.it Git - helm.git/blobdiff - helm/matita/matita.ml
snapshot
[helm.git] / helm / matita / matita.ml
index b71463860148a98b08c587d57d65dbcaed067ef8..dd813debeff745fa449ab42f57a396a1664a7ca2 100644 (file)
@@ -53,12 +53,22 @@ let disambiguator =
     ~chooseUris:(interactive_user_uri_choice ~gui)
     ~chooseInterp:(interactive_interp_choice ~gui)
     ()
+let new_proof proof =
+  (* TODO Zack: high level function which create a new proof object and register
+  * to it the widgets which must be refreshed upon status changes *)
+(*       proof#status#attach ... *)
+  proof#status#notify ();
+  set_proof proof
+let interpreter =
+  new MatitaInterpreter.interpreter
+    ~disambiguator ~console:gui#console ~get_proof ~new_proof ()
 
   (** quit program, possibly asking for confirmation *)
 let quit () = GMain.Main.quit ()
 
 let _ =
   gui#setQuitCallback quit;
+  gui#setPhraseCallback interpreter#evalPhrase;
   gui#main#debugMenu#misc#hide ();
   ignore (gui#main#newProofMenuItem#connect#activate (fun _ ->
    if has_proof () &&
@@ -74,9 +84,7 @@ let _ =
         disambiguator#disambiguateTerm (Stream.of_string input)
       in
       let proof = MatitaProof.proof ~typ:term ~metasenv () in
-(*       proof#status#attach ... FINQUI *)
-      proof#status#notify ();
-      set_proof proof;
+      new_proof proof;
       debug_print ("new proof, goal is: " ^ CicPp.ppterm term)))
 
   (** <DEBUGGING> *)