X-Git-Url: http://matita.cs.unibo.it/gitweb/?a=blobdiff_plain;f=helm%2Fsoftware%2Fcomponents%2Fcontent_pres%2Fsequent2pres.ml;h=549f5c7c58d6437216b9c1d9320d19856938ee62;hb=f9abd21eb0d26cf9b632af4df819225be4d091e3;hp=2ae090bb01e1d2f0a0040c21fa7d162bdacde7c4;hpb=e6d7bb2e5237c8f9c85179715edeab61263ab62d;p=helm.git diff --git a/helm/software/components/content_pres/sequent2pres.ml b/helm/software/components/content_pres/sequent2pres.ml index 2ae090bb0..549f5c7c5 100644 --- a/helm/software/components/content_pres/sequent2pres.ml +++ b/helm/software/components/content_pres/sequent2pres.ml @@ -47,7 +47,7 @@ let b_ink a = Box.Ink a module K = Content module P = Mpresentation -let sequent2pres term2pres (_,_,context,ty) = +let sequent2pres0 term2pres (_,_,context,ty) = let context2pres context = let rec aux accum = function @@ -96,12 +96,25 @@ let sequent2pres term2pres (_,_,context,ty) = pres_goal]))]) let sequent2pres ~ids_to_inner_sorts = - sequent2pres + sequent2pres0 (fun annterm -> let ast, ids_to_uris = - TermAcicContent.ast_of_acic ids_to_inner_sorts annterm + TermAcicContent.ast_of_acic ~output_type:`Term ids_to_inner_sorts annterm in CicNotationPres.box_of_mpres - (CicNotationPres.render ids_to_uris + (CicNotationPres.render + ~lookup_uri:(CicNotationPres.lookup_uri ids_to_uris) (TermContentPres.pp_ast ast))) +let nsequent2pres ~ids_to_nrefs ~subst = + let lookup_uri id = + try + let nref = Hashtbl.find ids_to_nrefs id in + Some (NReference.string_of_reference nref) + with Not_found -> None + in + sequent2pres0 + (fun ast -> + CicNotationPres.box_of_mpres + (CicNotationPres.render ~lookup_uri + (TermContentPres.pp_ast ast)))