]> matita.cs.unibo.it Git - helm.git/blobdiff - matita/matitaTypes.ml
more work on matitaprover (no more XML and buris are created).
[helm.git] / matita / matitaTypes.ml
index 13543dbb64d081f4afd1a1a7d2f599a956a11179..177cfb3af42ac179331ffc07ddb524c88d68b3fd 100644 (file)
@@ -35,6 +35,7 @@ type abouts =
   [ `Blank
   | `Current_proof
   | `Us
+  | `Coercions
   ]
   
 type mathViewer_entry =
@@ -42,6 +43,7 @@ type mathViewer_entry =
   | `Check of string (* term *)
   | `Cic of Cic.term * Cic.metasenv
   | `Dir of string (* "directory" in cic uris namespace *)
+  | `Metadata of [ `Deps of [`Fwd | `Back] * UriManager.uri ]
   | `Uri of UriManager.uri (* cic object uri *)
   | `Whelp of string * UriManager.uri list (* query and results *)
   ]
@@ -50,9 +52,20 @@ let string_of_entry = function
   | `About `Blank -> "about:blank"
   | `About `Current_proof -> "about:proof"
   | `About `Us -> "about:us"
+  | `About `Coercions -> "about:coercions"
   | `Check _ -> "check:"
   | `Cic (_, _) -> "term:"
   | `Dir uri -> uri
+  | `Metadata meta ->
+      "metadata:/" ^
+      (match meta with
+      | `Deps (dir, uri) ->
+          "deps/" ^
+          let suri =
+            let suri = UriManager.string_of_uri uri in
+            let len = String.length suri in
+            String.sub suri 4 (len - 4) in (* strip "cic:" prefix *)
+          (match dir with | `Fwd -> "forward" | `Back -> "backward") ^ suri)
   | `Uri uri -> UriManager.string_of_uri uri
   | `Whelp (query, _) -> query
 
@@ -60,6 +73,7 @@ let entry_of_string = function
   | "about:blank" -> `About `Blank
   | "about:proof" -> `About `Current_proof
   | "about:us"    -> `About `Us
+  | "about:coercions"    -> `About `Coercions
   | _ ->  (* only about entries supported ATM *)
       raise (Invalid_argument "entry_of_string")