diff options
Diffstat (limited to 'interp')
| -rw-r--r-- | interp/notation.ml | 5 | ||||
| -rw-r--r-- | interp/notation.mli | 5 |
2 files changed, 10 insertions, 0 deletions
diff --git a/interp/notation.ml b/interp/notation.ml index bb17eda2c9..e6c627e863 100644 --- a/interp/notation.ml +++ b/interp/notation.ml @@ -92,6 +92,11 @@ let scope_stack = ref [] let current_scopes () = !scope_stack +let scope_is_open_in_scopes sc l = + List.mem (Scope sc) l + +let scope_is_open sc = scope_is_open_in_scopes sc (!scope_stack) + (* TODO: push nat_scope, z_scope, ... in scopes summary *) (* Exportation of scopes *) diff --git a/interp/notation.mli b/interp/notation.mli index 35d1c0d17b..06349014db 100644 --- a/interp/notation.mli +++ b/interp/notation.mli @@ -39,6 +39,11 @@ val declare_scope : scope_name -> unit val current_scopes : unit -> scopes +(* Check where a scope is opened or not in a scope list, or in + * the current opened scopes *) +val scope_is_open_in_scopes : scope_name -> scopes -> bool +val scope_is_open : scope_name -> bool + (* Open scope *) val open_close_scope : |
