aboutsummaryrefslogtreecommitdiff
path: root/interp/implicit_quantifiers.ml
diff options
context:
space:
mode:
authorMaxime Dénès2017-09-07 12:44:47 +0200
committerMaxime Dénès2017-09-07 12:44:47 +0200
commit084ef41c98d52078f85831c940d0a073a4ccdb7a (patch)
treef1808d72e562f0dd674759f2f447f44cd5da9aad /interp/implicit_quantifiers.ml
parent276f08cb053eed175478c4c9359e61fb949742ba (diff)
parent1db568d3dc88d538f975377bb4d8d3eecd87872c (diff)
Merge PR #914: Making the detyper lazy
Diffstat (limited to 'interp/implicit_quantifiers.ml')
-rw-r--r--interp/implicit_quantifiers.ml11
1 files changed, 6 insertions, 5 deletions
diff --git a/interp/implicit_quantifiers.ml b/interp/implicit_quantifiers.ml
index e498d979de..cae67c3e70 100644
--- a/interp/implicit_quantifiers.ml
+++ b/interp/implicit_quantifiers.ml
@@ -119,13 +119,14 @@ let free_vars_of_binders ?(bound=Id.Set.empty) l (binders : local_binder_expr li
in aux bound l binders
let generalizable_vars_of_glob_constr ?(bound=Id.Set.empty) ?(allowed=Id.Set.empty) =
- let rec vars bound vs t = match t with
- | { loc; CAst.v = GVar id } ->
+ let rec vars bound vs c = match DAst.get c with
+ | GVar id ->
+ let loc = c.CAst.loc in
if is_freevar bound (Global.env ()) id then
if Id.List.mem_assoc_sym id vs then vs
else (Loc.tag ?loc id) :: vs
else vs
- | c -> Glob_ops.fold_glob_constr_with_binders Id.Set.add vars bound vs c
+ | _ -> Glob_ops.fold_glob_constr_with_binders Id.Set.add vars bound vs c
in fun rt ->
let vars = List.rev (vars bound [] rt) in
List.iter (fun (loc, id) ->
@@ -253,11 +254,11 @@ let implicits_of_glob_constr ?(with_products=true) l =
(ExplByPos (i, name), (true, true, true)) :: l
| _ -> l
in
- let rec aux i { loc; CAst.v = c } =
+ let rec aux i c =
let abs na bk b =
add_impl i na bk (aux (succ i) b)
in
- match c with
+ match DAst.get c with
| GProd (na, bk, t, b) ->
if with_products then abs na bk b
else