aboutsummaryrefslogtreecommitdiff
path: root/interp/notation.ml
diff options
context:
space:
mode:
authorMaxime Dénès2017-08-29 14:41:36 +0200
committerMaxime Dénès2017-08-29 14:41:36 +0200
commit9326b0466cc04175436dc57cf0283c151b587e54 (patch)
treeefa25b429b80403105431c8ea21bae475dffea8e /interp/notation.ml
parent57af4b4112dd0bc54badf0faebb373ef70ea2c1a (diff)
parent414a30432119bcc878793b33144f671403132f7a (diff)
Merge PR #916: Fixing notation bug 5608 involving { } and a slight restructuration
Diffstat (limited to 'interp/notation.ml')
-rw-r--r--interp/notation.ml10
1 files changed, 8 insertions, 2 deletions
diff --git a/interp/notation.ml b/interp/notation.ml
index c07a009438..c373faf680 100644
--- a/interp/notation.ml
+++ b/interp/notation.ml
@@ -41,7 +41,6 @@ open Context.Named.Declaration
(**********************************************************************)
(* Scope of symbols *)
-type level = precedence * tolerability list
type delimiters = string
type notation_location = (DirPath.t * DirPath.t) * string
@@ -83,11 +82,18 @@ let parenRelation_eq t1 t2 = match t1, t2 with
| Prec l1, Prec l2 -> Int.equal l1 l2
| _ -> false
-let level_eq (l1, t1) (l2, t2) =
+let notation_var_internalization_type_eq v1 v2 = match v1, v2 with
+| NtnInternTypeConstr, NtnInternTypeConstr -> true
+| NtnInternTypeBinder, NtnInternTypeBinder -> true
+| NtnInternTypeIdent, NtnInternTypeIdent -> true
+| (NtnInternTypeConstr | NtnInternTypeBinder | NtnInternTypeIdent), _ -> false
+
+let level_eq (l1, t1, u1) (l2, t2, u2) =
let tolerability_eq (i1, r1) (i2, r2) =
Int.equal i1 i2 && parenRelation_eq r1 r2
in
Int.equal l1 l2 && List.equal tolerability_eq t1 t2
+ && List.equal notation_var_internalization_type_eq u1 u2
let declare_scope scope =
try let _ = String.Map.find scope !scope_map in ()