]> matita.cs.unibo.it Git - helm.git/blobdiff - helm/ocaml/cic_annotations_cache/cicCache.ml
- the mathql interpreter is not helm-dependent any more
[helm.git] / helm / ocaml / cic_annotations_cache / cicCache.ml
index b26bddbf8fb86a171e6448a6a5405cfab3262504..de5c1926e6f3d569169e3c08b2ee8ae3cd47641d 100644 (file)
@@ -39,13 +39,19 @@ let get_annobj uri =
  let module G = Getter in
  let module U = UriManager in
   let cicfilename = G.getxml (U.cicuri_of_uri uri) in
-   match CicParser.term_of_xml cicfilename uri true with
-      (_, None) -> assert false
-    | (annobj, Some ids_to_targets) ->
-        if U.uri_is_annuri uri then
-         begin
-          let annfilename = G.getxml (U.annuri_of_uri uri) in
-           CicAnnotationParser.annotate annfilename ids_to_targets
-         end ;
-        (annobj, ids_to_targets)
+  let cicbodyfilename =
+   match U.bodyuri_of_uri uri with
+      None -> None
+    | Some bodyuri ->
+       Some (G.getxml (U.cicuri_of_uri bodyuri))
+  in
+   let annobj = CicParser.annobj_of_xml cicfilename cicbodyfilename in
+    annobj,
+     if U.uri_is_annuri uri then
+      begin
+       let annfilename = G.getxml (U.annuri_of_uri uri) in
+        Some (CicAnnotationParser.get_annotations annfilename)
+      end
+     else
+      None
 ;;