X-Git-Url: http://matita.cs.unibo.it/gitweb/?a=blobdiff_plain;f=helm%2Fmatita%2Fmatita.ml;h=dd813debeff745fa449ab42f57a396a1664a7ca2;hb=56415e42c04f40e9c8f7cfc59a3a3d87c3d373f7;hp=b71463860148a98b08c587d57d65dbcaed067ef8;hpb=4e209a820d68ae8883b6eb7540570c55678a4b84;p=helm.git diff --git a/helm/matita/matita.ml b/helm/matita/matita.ml index b71463860..dd813debe 100644 --- a/helm/matita/matita.ml +++ b/helm/matita/matita.ml @@ -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))) (** *)