aboutsummaryrefslogtreecommitdiff
path: root/interp/notation.mli
diff options
context:
space:
mode:
authorEmilio Jesus Gallego Arias2016-09-24 20:36:59 +0200
committerEmilio Jesus Gallego Arias2016-09-25 21:59:57 +0200
commit0f1b5603d1922718f36545f201212fc2796f41a4 (patch)
tree6385e1500feee1bf5564c0802763df6f0f4505e4 /interp/notation.mli
parentf487472a5628fdb43245e782b304705172a1f569 (diff)
[notation] Allow to retrieve defined notations.
The ML side lacks a method to query Coq for notations with defined parsing/printing rules. This commit adds a method `get_defined_notations` to that purpose. This is very useful for instance in plugins like SerAPI. In the medium-term, the `Notation` interface may benefit from a bit of refactoring to allow programmatic access and manipulation of notations.
Diffstat (limited to 'interp/notation.mli')
-rw-r--r--interp/notation.mli3
1 files changed, 3 insertions, 0 deletions
diff --git a/interp/notation.mli b/interp/notation.mli
index b47e1975e3..2e92a00a8c 100644
--- a/interp/notation.mli
+++ b/interp/notation.mli
@@ -203,6 +203,9 @@ val find_notation_extra_printing_rules : notation -> extra_unparsing_rules
val find_notation_parsing_rules : notation -> notation_grammar
val add_notation_extra_printing_rule : notation -> string -> string -> unit
+(** Returns notations with defined parsing/printing rules *)
+val get_defined_notations : unit -> notation list
+
(** Rem: printing rules for primitive token are canonical *)
val with_notation_protection : ('a -> 'b) -> 'a -> 'b