Skip to content

Commit 3111dac

Browse files
authored
Merge pull request #388 from ecranceMERCE/fix-nups
Fix #386
2 parents a1686b5 + c7af59d commit 3111dac

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/coq_elpi_HOAS.ml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2713,17 +2713,17 @@ let lp2inductive_entry ~depth coq_ctx constraints state t =
27132713
lp2constr constraints coq_ctx ~depth state t in
27142714

27152715
let check_consistency_and_drop_nuparams sigma nuparams name params arity =
2716-
let eq_param x y =
2716+
let eq_param ind_index x y =
27172717
Name.equal
27182718
(Context.Rel.Declaration.get_name x)
27192719
(Context.Rel.Declaration.get_name y) &&
27202720
EConstr.eq_constr_nounivs sigma
2721-
(EConstr.Vars.lift 1 (Context.Rel.Declaration.get_type x))
2721+
(EConstr.Vars.liftn 1 ind_index (Context.Rel.Declaration.get_type x))
27222722
(Context.Rel.Declaration.get_type y) in
27232723
let rec aux n nuparams params =
27242724
match nuparams, params with
27252725
| [], params -> EC.it_mkProd_or_LetIn arity (List.rev params)
2726-
| x :: nuparams, y :: params when eq_param x y ->
2726+
| x :: nuparams, y :: params when eq_param n x y ->
27272727
aux (succ n) nuparams params
27282728
| x :: _, p -> err Pp.(pr_nth n ++ str" non uniform parameter, named " ++
27292729
Name.print (Context.Rel.Declaration.get_name x) ++

0 commit comments

Comments
 (0)