X-Git-Url: http://matita.cs.unibo.it/gitweb/?a=blobdiff_plain;ds=sidebyside;f=helm%2Focaml%2Fmetadata%2FmetadataPp.ml;h=e2e21662b371a3c58711d30d569aa4b27ecdc92e;hb=b41886e9d21d756279bd6a2ec3f19c17b1a64401;hp=2ce9f22267d05548d00160e203de347eb65de3ea;hpb=9cd69dd86ed337478461241d497265ccc59f819a;p=helm.git diff --git a/helm/ocaml/metadata/metadataPp.ml b/helm/ocaml/metadata/metadataPp.ml index 2ce9f2226..e2e21662b 100644 --- a/helm/ocaml/metadata/metadataPp.ml +++ b/helm/ocaml/metadata/metadataPp.ml @@ -25,6 +25,8 @@ open Printf +open MetadataTypes + let pp_position = function | `MainConclusion (Some d) -> sprintf "MainConclusion(%d)" d | `MainConclusion None -> sprintf "MainConclusion" @@ -35,36 +37,30 @@ let pp_position = function | `InBody -> "InBody" let pp_position_tag = function - | `MainConclusion _ -> "MainConclusion" - | `MainHypothesis _ -> "MainHypothesis" - | `InConclusion -> "InConclusion" - | `InHypothesis -> "InHypothesis" - | `InBody -> "InBody" + | `MainConclusion _ -> mainconcl_pos + | `MainHypothesis _ -> mainhyp_pos + | `InConclusion -> inconcl_pos + | `InHypothesis -> inhyp_pos + | `InBody -> inbody_pos let columns_of_position = function - | `MainConclusion (Some d) -> `String "MainConclusion", `Int d - | `MainConclusion None -> `String "MainConclusion", `Null - | `MainHypothesis (Some d) -> `String "MainHypothesis", `Int d - | `MainHypothesis None -> `String "MainHypothesis", `Null - | `InConclusion -> `String "InConclusion", `Null - | `InHypothesis -> `String "InHypothesis", `Null - | `InBody -> `String "InBody", `Null + | `MainConclusion (Some d) -> `String mainconcl_pos, `Int d + | `MainConclusion None -> `String mainconcl_pos, `Null + | `MainHypothesis (Some d) -> `String mainhyp_pos, `Int d + | `MainHypothesis None -> `String mainhyp_pos, `Null + | `InConclusion -> `String inconcl_pos, `Null + | `InHypothesis -> `String inhyp_pos, `Null + | `InBody -> `String inbody_pos, `Null (* let metadata_ns = "http://www.cs.unibo.it/helm/schemas/schema-helm" let uri_of_pos pos = String.concat "#" [metadata_ns; pp_position pos] *) -let pp_sort = function - | Cic.Prop -> "Prop" - | Cic.Set -> "Set" - | Cic.Type _ -> "Type" - | Cic.CProp -> "CProp" - type t = [ `Int of int | `String of string | `Null ] let columns_of_metadata ~about metadatas = - let sort s = `String (pp_sort s) in + let sort s = `String (CicPp.ppsort s) in let source = `String about in let occurrence u = `String u in List.fold_left @@ -89,9 +85,11 @@ let columns_of_ind_metadata ind_metadata = (List.append sort_cols s, List.append rel_cols r, List.append obj_cols o)) ([], [], []) ind_metadata +(* let pp_columns ?(sep = "\n") (sort_cols, rel_cols, obj_cols) = String.concat sep ([ "Sort" ] @ List.map Dbi.sdebug (sort_cols :> Dbi.sql_t list list) @ [ "Rel" ] @ List.map Dbi.sdebug (rel_cols :> Dbi.sql_t list list) @ [ "Obj" ] @ List.map Dbi.sdebug (obj_cols :> Dbi.sql_t list list)) +*)