diff options
| author | Pierre-Marie Pédrot | 2014-03-01 16:02:34 +0100 |
|---|---|---|
| committer | Pierre-Marie Pédrot | 2014-03-01 16:02:34 +0100 |
| commit | 124734fd2c523909802d095abb37350519856864 (patch) | |
| tree | 177d3fe6ed5fe665a7151601802eb4bb09b9e0eb | |
| parent | 9e2ee5801ae37e54dfac34f27ed2f07bbb8322d3 (diff) | |
Useless check when loading notations through import.
| -rw-r--r-- | interp/notation.ml | 8 | ||||
| -rw-r--r-- | interp/notation.mli | 4 | ||||
| -rw-r--r-- | toplevel/metasyntax.ml | 2 |
3 files changed, 1 insertions, 13 deletions
diff --git a/interp/notation.ml b/interp/notation.ml index fa428f1b3b..a9206b9338 100644 --- a/interp/notation.ml +++ b/interp/notation.ml @@ -511,14 +511,6 @@ let availability_of_prim_token n printer_scope local_scopes = (* Miscellaneous *) -let exists_notation_in_scope scopt ntn r = - let scope = match scopt with Some s -> s | None -> default_scope in - try - let sc = String.Map.find scope !scope_map in - let (r',_) = String.Map.find ntn sc.notations in - Pervasives.(=) r' r (** FIXME *) - with Not_found -> false - let isNVar_or_NHole = function NVar _ | NHole _ -> true | _ -> false (**********************************************************************) diff --git a/interp/notation.mli b/interp/notation.mli index 192e2b6e6c..a4ca3ffaab 100644 --- a/interp/notation.mli +++ b/interp/notation.mli @@ -141,10 +141,6 @@ val level_of_notation : notation -> level (** raise [Not_found] if no level *) val interp_notation_as_global_reference : Loc.t -> (global_reference -> bool) -> notation -> delimiters option -> global_reference -(** Checks for already existing notations *) -val exists_notation_in_scope : scope_name option -> notation -> - interpretation -> bool - (** Declares and looks for scopes associated to arguments of a global ref *) val declare_arguments_scope : bool (** true=local *) -> global_reference -> scope_name option list -> unit diff --git a/toplevel/metasyntax.ml b/toplevel/metasyntax.ml index 58f8d6d4e5..43a0a43b43 100644 --- a/toplevel/metasyntax.ml +++ b/toplevel/metasyntax.ml @@ -1059,7 +1059,7 @@ let open_notation i (_, nobj) = let scope = nobj.notobj_scope in let (ntn, df) = nobj.notobj_notation in let pat = nobj.notobj_interp in - if Int.equal i 1 && not (Notation.exists_notation_in_scope scope ntn pat) then begin + if Int.equal i 1 then begin (* Declare the interpretation *) Notation.declare_notation_interpretation ntn scope pat df; (* Declare the uninterpretation *) |
