Skip to content

Commit 3af8b2c

Browse files
committed
change error msg when section var are cleared
1 parent 75b6197 commit 3af8b2c

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/coq_elpi_HOAS.ml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1306,7 +1306,10 @@ let rec constr2lp coq_ctx ~calldepth ~depth state t =
13061306
let state, elpi_uvk, _, gsl_t = in_elpi_evar ~calldepth k state in
13071307
gls := gsl_t @ !gls;
13081308
let args = Evd.expand_existential sigma (k, args) in
1309-
let args = CList.firstn (List.length args - coq_ctx.section_len) args in
1309+
let argno = List.length args - coq_ctx.section_len in
1310+
if (argno < 0) then
1311+
nYI "constr2lp: cleared section variables";
1312+
let args = CList.firstn argno args in
13101313
let state, args = CList.fold_left_map (aux ~depth env) state args in
13111314
state, E.mkUnifVar elpi_uvk ~args:(List.rev args) state
13121315
| C.Sort s -> in_elpi_sort ~depth state (EC.ESorts.kind sigma s)

0 commit comments

Comments
 (0)