diff options
| author | vsiles | 2009-04-30 10:04:41 +0000 |
|---|---|---|
| committer | vsiles | 2009-04-30 10:04:41 +0000 |
| commit | 95e33bcedadfbc2493f3036fbdb668506bfcdab4 (patch) | |
| tree | ebf883ebde1b15c889942e4f993a7d21d6bd9f1e /interp | |
| parent | ac062421fb5fba8ee4b9cadb7b62ce1066ce6194 (diff) | |
Fix a small notation/scope bug:
When defining an inductive type with a reserved notation in a
particuliar scope, the scope was not opened during the interpretation.
git-svn-id: svn+ssh://scm.gforge.inria.fr/svn/coq/trunk@12117 85f007b7-540e-0410-9357-904b9bb8a0f7
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 : |
