aboutsummaryrefslogtreecommitdiff
path: root/pretyping/glob_ops.ml
diff options
context:
space:
mode:
authorMaxime Dénès2017-10-03 11:45:31 +0200
committerMaxime Dénès2017-10-03 11:45:31 +0200
commitafe519db64b4864b5a901ab96a1e4297e9316b14 (patch)
tree9fe22a04fcfd049081dedb6f9262a3a321176d03 /pretyping/glob_ops.ml
parente33cd69ab6fcb38478a6c0e00628a5de16181906 (diff)
parentb772c323f62b322c9b0a4ab90c7de8b1e2066bae (diff)
Merge PR #1040: Efficient fresh name generation
Diffstat (limited to 'pretyping/glob_ops.ml')
-rw-r--r--pretyping/glob_ops.ml6
1 files changed, 3 insertions, 3 deletions
diff --git a/pretyping/glob_ops.ml b/pretyping/glob_ops.ml
index e1576b9713..7804cc6796 100644
--- a/pretyping/glob_ops.ml
+++ b/pretyping/glob_ops.ml
@@ -273,17 +273,17 @@ let free_glob_vars =
| _ -> fold_glob_constr_with_binders Id.Set.add vars bound vs c in
fun rt ->
let vs = vars Id.Set.empty Id.Set.empty rt in
- Id.Set.elements vs
+ vs
let glob_visible_short_qualid c =
let rec aux acc c = match DAst.get c with
| GRef (c,_) ->
let qualid = Nametab.shortest_qualid_of_global Id.Set.empty c in
let dir,id = Libnames.repr_qualid qualid in
- if DirPath.is_empty dir then id :: acc else acc
+ if DirPath.is_empty dir then Id.Set.add id acc else acc
| _ ->
fold_glob_constr aux acc c
- in aux [] c
+ in aux Id.Set.empty c
let warn_variable_collision =
let open Pp in