- let console = gui#console in
- new MatitaInterpreter.interpreter ~disambiguator ~proof_handler ~console ()
-
- (** prompt the user for the textual input of a term and disambiguate it *)
-let ask_term ?(title = "term input") ?(msg = "insert term") () =
- match gui#askText ~title ~msg () with
- | Some t ->
- let (_, _, term) = disambiguator#disambiguateTerm (Stream.of_string t) in
- Some term
- | None -> None
-
-(** {2 Script window handling} *)
-
-let script_forward _ =
- let buf = gui#script#scriptTextView#buffer in
- let locked_iter = buf#get_iter_at_mark (`NAME "locked") in
- interpreter#evalPhrase
- (buf#get_text ~start:locked_iter ~stop:buf#end_iter ());
- gui#lockScript (locked_iter#offset + interpreter#endOffset)
-
-let script_jump _ =
- let buf = gui#script#scriptTextView#buffer in
- let locked_iter = buf#get_iter_at_mark (`NAME "locked") in
- let cursor_iter = buf#get_iter_at_mark (`NAME "insert") in
- let raw_text = buf#get_text ~start:locked_iter ~stop:cursor_iter () in
- let len = String.length raw_text in
- let rec parse offset =
- if offset < len then begin
- interpreter#evalPhrase ~transparent:true
- (String.sub raw_text offset (len - offset));
- let new_offset = interpreter#endOffset + offset in
- gui#lockScript (new_offset + locked_iter#offset);
- parse new_offset
- end
+ let mathViewer = MatitaMathView.mathViewer () in
+ MatitaInterpreter.interpreter ~console:gui#console ~mathViewer ()
+let script = MatitaScript.script ~interpreter
+let _ =
+ let href_callback uri =
+ let term = CicAst.Uri (uri, None) in
+ ignore (interpreter#evalAst (TacticAst.Command (TacticAst.Check term)))