]> matita.cs.unibo.it Git - helm.git/blobdiff - helm/ocaml/cic_notation/cicNotation.ml
ocaml 3.09 transition
[helm.git] / helm / ocaml / cic_notation / cicNotation.ml
index 9ed0c5038e07c5c5d28792c4bf17233144a0df6e..cbad3391f3e01f8f67acec183780c5a748a58b00 100644 (file)
@@ -70,3 +70,21 @@ let load_notation fname =
     done
   with End_of_file -> close_in ic
 
+let get_all_notations () =
+  List.map
+    (fun (interp_id, dsc) ->
+      InterpretationId interp_id, "interpretation: " ^ dsc)
+    (CicNotationRew.get_all_interpretations ())
+
+let get_active_notations () =
+  List.map (fun id -> InterpretationId id)
+    (CicNotationRew.get_active_interpretations ())
+
+let set_active_notations ids =
+  let interp_ids =
+    HExtlib.filter_map
+      (function InterpretationId interp_id -> Some interp_id | _ -> None)
+      ids
+  in
+  CicNotationRew.set_active_interpretations interp_ids
+