aboutsummaryrefslogtreecommitdiffhomepage
path: root/kernel/univ.ml
diff options
context:
space:
mode:
authorGravatar letouzey <letouzey@85f007b7-540e-0410-9357-904b9bb8a0f7>2013-10-24 21:29:41 +0000
committerGravatar letouzey <letouzey@85f007b7-540e-0410-9357-904b9bb8a0f7>2013-10-24 21:29:41 +0000
commit6da011a8677676462b24940a6171fb22615c3fbb (patch)
tree0df385cc8b8d72b3465d7745d2b97283245c7ed5 /kernel/univ.ml
parent133a2143413a723d1d4e3dead5ffa8458f61afa8 (diff)
More monomorphic List.mem + List.assoc + ...
To reduce the amount of syntactic noise, we now provide a few inner modules Int.List, Id.List, String.List, Sorts.List which contain some monomorphic (or semi-monomorphic) functions such as mem, assoc, ... NB: for Int.List.mem and co we reuse List.memq and so on. git-svn-id: svn+ssh://scm.gforge.inria.fr/svn/coq/trunk@16936 85f007b7-540e-0410-9357-904b9bb8a0f7
Diffstat (limited to 'kernel/univ.ml')
-rw-r--r--kernel/univ.ml4
1 files changed, 3 insertions, 1 deletions
diff --git a/kernel/univ.ml b/kernel/univ.ml
index 9b5c42f56..7f5c71c70 100644
--- a/kernel/univ.ml
+++ b/kernel/univ.ml
@@ -950,10 +950,12 @@ let no_upper_constraints u cst =
(* Is u mentionned in v (or equals to v) ? *)
+let level_list_mem u l = List.mem_f UniverseLevel.equal u l
+
let univ_depends u v =
match u, v with
| Atom u, Atom v -> UniverseLevel.equal u v
- | Atom u, Max (gel,gtl) -> List.mem u gel || List.mem u gtl
+ | Atom u, Max (gel,gtl) -> level_list_mem u gel || level_list_mem u gtl
| _ -> anomaly (Pp.str "univ_depends given a non-atomic 1st arg")
(* Pretty-printing *)