- let module K = Content in
- let module P = Mpresentation in
- match obj with
- `Def (K.Const,thesis,`Proof p) ->
- P.Mtable
- [None,"align","baseline 1";
- None,"equalrows","false";
- None,"columnalign","left";
- None,"helm:xref","id"]
- ([P.Mtr []
- [P.Mtd []
- (P.Mrow []
- [P.Mtext []
- ("UNFINISHED PROOF" ^ id ^"(" ^
- String.concat " ; " (List.map UriManager.string_of_uri params)^
- ")")])] ;
- P.Mtr []
- [P.Mtd []
- (P.Mrow []
- [P.Mtext [] "THESIS:"])] ;
- P.Mtr []
- [P.Mtd []
- (P.Mrow []
- [P.Mphantom []
- (P.Mtext [] "__") ;
- term2pres thesis])]] @
- (match metasenv with
- None -> []
- | Some metasenv' ->
- [P.Mtr []
- [P.Mtd []
- (* Conjectures are in their own table to make *)
- (* diffing the DOM trees easier. *)
- (P.Mtable
- [None,"align","baseline 1";
- None,"equalrows","false";
- None,"columnalign","left"]
- ((P.Mtr []
- [P.Mtd []
- (P.Mrow []
- [P.Mtext [] "CONJECTURES:"])])::
- List.map
- (function
- (id,n,context,ty) ->
- P.Mtr []
- [P.Mtd []
- (P.Mrow [Some "helm", "xref", id]
- (List.map
- (function
- (_,None) ->
- P.Mrow []
- [ P.Mi [] "_" ;
- P.Mo [] ":?" ;
- P.Mi [] "_"]
- | (_,Some (`Declaration d))
- | (_,Some (`Hypothesis d)) ->
- let
- { K.dec_name = dec_name ;
- K.dec_type = ty } = d
- in
- P.Mrow []
- [ P.Mi []
- (match dec_name with
- None -> "_"
- | Some n -> n) ;
- P.Mo [] ":" ;
- term2pres ty]
- | (_,Some (`Definition d)) ->
- let
- { K.def_name = def_name ;
- K.def_term = bo } = d
- in
- P.Mrow []
- [ P.Mi []
- (match def_name with
- None -> "_"
- | Some n -> n) ;
- P.Mo [] ":=" ;
- term2pres bo]
- | (_,Some (`Proof p)) ->
- let proof_name = p.K.proof_name in
- P.Mrow []
- [ P.Mi []
- (match proof_name with
- None -> "_"
- | Some n -> n) ;
- P.Mo [] ":=" ;
- proof2pres term2pres p]
- ) context @
- [ P.Mo [] "|-" ] @
- [ P.Mi [] (string_of_int n) ;
- P.Mo [] ":" ;
- term2pres ty ]
- ))
- ]
- ) metasenv'
- ))]]
- ) @
- [P.Mtr []
- [P.Mtd []
- (P.Mrow []
- [proof2pres term2pres p])]])
- | _ -> raise ToDo
+ let module K = Content in
+ match obj with
+ `Def (K.Const,thesis,`Proof p) ->
+ B.b_v
+ [None,"helm:xref","id"]
+ ([B.b_text [] ("UNFINISHED PROOF " ^ id ^"(" ^ String.concat " ; " (List.map UriManager.string_of_uri params)^ ")") ;
+ B.b_text [] "THESIS:" ;
+ B.indent (term2pres thesis)] @
+ (match metasenv with
+ None -> []
+ | Some metasenv' ->
+ (* Conjectures are in their own table to make *)
+ (* diffing the DOM trees easier. *)
+ (B.b_v []
+ ((B.b_text [] ("CONJECTURES:" ^ (let _ = incr aaa; in (string_of_int !aaa))))::
+ (List.map
+ (function
+ (id,n,context,ty) ->
+ (B.b_h [Some "helm", "xref", id]
+ (((List.map
+ (function
+ None ->
+ B.b_h []
+ [ B.b_object (p_mi [] "_") ;
+ B.b_object (p_mo [] ":?") ;
+ B.b_object (p_mi [] "_")]
+ | Some (`Declaration d)
+ | Some (`Hypothesis d) ->
+ let
+ { K.dec_name = dec_name ;
+ K.dec_type = ty } = d
+ in
+ B.b_h []
+ [ B.b_object (p_mi []
+ (match dec_name with
+ None -> "_"
+ | Some n -> n)) ;
+ B.b_text [] ":" ;
+ term2pres ty]
+ | Some (`Definition d) ->
+ let
+ { K.def_name = def_name ;
+ K.def_term = bo } = d
+ in
+ B.b_h []
+ [ B.b_object (p_mi []
+ (match def_name with
+ None -> "_"
+ | Some n -> n)) ;
+ B.b_text [] ":=" ;
+ term2pres bo]
+ | Some (`Proof p) ->
+ let proof_name = p.K.proof_name in
+ B.b_h []
+ [ B.b_object (p_mi []
+ (match proof_name with
+ None -> "_"
+ | Some n -> n)) ;
+ B.b_text [] ":=" ;
+ proof2pres term2pres p]
+ ) (List.rev context)) @
+ [ B.b_text [] "|-" ;
+ B.b_object (p_mi [] (string_of_int n)) ;
+ B.b_text [] ":" ;
+ term2pres ty ])
+ ))
+ ) metasenv'))
+ )::[proof2pres term2pres p]
+ )
+ )
+ | _ -> raise ToDo