Skip to content

Commit 1606f62

Browse files
committed
fix rebase
1 parent bc9740b commit 1606f62

File tree

1 file changed

+2
-41
lines changed

1 file changed

+2
-41
lines changed

src/coq_elpi_builtins.ml

Lines changed: 2 additions & 41 deletions
Original file line numberDiff line numberDiff line change
@@ -1121,8 +1121,8 @@ let dep1 ?inside sigma gr =
11211121
if ModPath.equal (modpath_of_gref x) modpath
11221122
then GRSet.add x acc
11231123
else acc in
1124-
<<<<<<< HEAD
11251124
let add acc t = grefs_of_term sigma (EConstr.of_constr t) add_if_inside acc in
1125+
GRSet.remove gr @@
11261126
match gr with
11271127
| VarRef id ->
11281128
let decl = Environ.lookup_named id (Global.env()) in
@@ -1146,41 +1146,6 @@ let dep1 ?inside sigma gr =
11461146
let _, indbody = Global.lookup_inductive i in
11471147
let l = indbody.Declarations.mind_user_lc in
11481148
CArray.fold_left add GRSet.empty l
1149-
=======
1150-
let rec add acc c =
1151-
let open Constr in
1152-
match kind c with
1153-
| Var x -> add_if_inside (VarRef x) acc
1154-
| Const (c,_) -> add_if_inside (ConstRef c) acc
1155-
| Ind (i,_) -> add_if_inside (IndRef i) acc
1156-
| Construct (k,_) -> add_if_inside (ConstructRef k) acc
1157-
| _ -> Constr.fold add acc c
1158-
in
1159-
GRSet.remove gr @@
1160-
match gr with
1161-
| VarRef id ->
1162-
let decl = Environ.lookup_named id (Global.env()) in
1163-
let ty = Context.Named.Declaration.get_type decl in
1164-
let bo = Context.Named.Declaration.get_value decl in
1165-
let l =
1166-
match bo with
1167-
| None -> [ty]
1168-
| Some bo -> [ty; bo] in
1169-
List.fold_left add GRSet.empty l
1170-
| ConstRef cst ->
1171-
let cb = Environ.lookup_constant cst (Global.env()) in
1172-
let ty = cb.Declarations.const_type in
1173-
let bo = Global.body_of_constant_body Library.indirect_accessor cb in
1174-
let l =
1175-
match bo with
1176-
| Some (e,_,_) -> [ty; e]
1177-
| None -> [ty] in
1178-
List.fold_left add GRSet.empty l
1179-
| IndRef i | ConstructRef (i,_) ->
1180-
let _, indbody = Global.lookup_inductive i in
1181-
let l = indbody.Declarations.mind_user_lc in
1182-
CArray.fold_left add GRSet.empty l
1183-
>>>>>>> coq.env.dependencies don't include the root
11841149

11851150
let universe_level_set, universe_level_set_decl =
11861151
B.ocaml_set_conv ~name:"coq.univ.variable.set" universe_level_variable (module UnivLevelSet)
@@ -1739,8 +1704,7 @@ Supported attributes:
17391704
let seen = GRSet.add x seen in
17401705
aux seen (deps :: s :: rest)
17411706
in
1742-
<<<<<<< HEAD
1743-
!: (aux GRSet.empty [dep1 ?inside sigma roots]))),
1707+
!: (GRSet.remove root @@ aux GRSet.empty [dep1 ?inside sigma root]))),
17441708
DocAbove);
17451709

17461710
MLCode(Pred("coq.env.term-dependencies",
@@ -1751,9 +1715,6 @@ Supported attributes:
17511715
let sigma = get_sigma state in
17521716
let s = grefs_of_term sigma t GRSet.add GRSet.empty in
17531717
state, !: s, [])),
1754-
=======
1755-
!: (GRSet.remove root @@ aux GRSet.empty [dep1 ?inside root]))),
1756-
>>>>>>> coq.env.dependencies don't include the root
17571718
DocAbove);
17581719

17591720
MLCode(Pred("coq.env.current-path",

0 commit comments

Comments
 (0)