Not_found -> "/public/constanttype"
;;
-let mml_of_cic_term metano term =
- let metasenv =
- match !ProofEngine.proof with
- None -> []
- | Some (_,metasenv,_,_) -> metasenv
- in
- let context =
- match !ProofEngine.goal with
- None -> []
- | Some metano ->
- let (_,canonical_context,_) =
- List.find (function (m,_,_) -> m=metano) metasenv
- in
- canonical_context
- in
- let sequent_gdome,ids_to_terms,ids_to_father_ids,ids_to_hypotheses =
- SequentPp.XmlPp.print_sequent metasenv (metano,context,term)
- in
- let sequent_doc =
- Xml2Gdome.document_of_xml Misc.domImpl sequent_gdome
- in
- let res = apply_sequent_stylesheets sequent_doc in
- res, (term,ids_to_terms,ids_to_father_ids,ids_to_hypotheses)
+let mml_of_cic_sequent metasenv sequent =
+ let sequent_gdome,ids_to_terms,ids_to_father_ids,ids_to_hypotheses =
+ SequentPp.XmlPp.print_sequent metasenv sequent in
+ let sequent_doc =
+ Xml2Gdome.document_of_xml Misc.domImpl sequent_gdome in
+ let sequent_mml = apply_sequent_stylesheets sequent_doc in
+ sequent_mml,(ids_to_terms,ids_to_father_ids,ids_to_hypotheses)
;;
let
(* *)
(******************************************************************************)
-(* Not exported:
-val apply_proof_stylesheets :
- Gdome.document -> explode_all:bool -> Gdome.document
-*)
-val apply_sequent_stylesheets : Gdome.document -> Gdome.document
-
-val mml_of_cic_term :
- int -> Cic.term ->
+val mml_of_cic_sequent :
+ Cic.metasenv ->
+ int * Cic.context * Cic.term ->
Gdome.document *
- (Cic.term * (Cic.id, Cic.term) Hashtbl.t *
- (Cic.id, Cic.id option) Hashtbl.t * (string, Cic.hypothesis) Hashtbl.t)
+ ((Cic.id, Cic.term) Hashtbl.t *
+ (Cic.id, Cic.id option) Hashtbl.t *
+ (string, Cic.hypothesis) Hashtbl.t)
val mml_of_cic_object :
explode_all:bool ->
exception NotImplemented;;
let print_sequent (metano,context,goal) =
- let module P = ProofEngine in
- "\n" ^
- let (output,pretty_printer_context_of_context) = print_context context in
- output ^
- "---------------------- ?" ^ string_of_int metano ^ "\n" ^
- CicPp.pp goal pretty_printer_context_of_context
+ "\n" ^
+ let (output,pretty_printer_context_of_context) = print_context context in
+ output ^
+ "---------------------- ?" ^ string_of_int metano ^ "\n" ^
+ CicPp.pp goal pretty_printer_context_of_context
;;
end
;;
) selections
method load_sequent metasenv sequent =
- let sequent_gdome,ids_to_terms,ids_to_father_ids,ids_to_hypotheses =
- SequentPp.XmlPp.print_sequent metasenv sequent in
- let sequent_doc =
- Xml2Gdome.document_of_xml Misc.domImpl sequent_gdome in
- let sequent_mml =
- ApplyStylesheets.apply_sequent_stylesheets sequent_doc
+ let sequent_mml,(ids_to_terms,ids_to_father_ids,ids_to_hypotheses) =
+ ApplyStylesheets.mml_of_cic_sequent metasenv sequent
in
self#load_doc ~dom:sequent_mml ;
current_infos <-