Skip to content

Commit

Permalink
Merge pull request #580 from FissoreD/clear_sec_variable_err_msg
Browse files Browse the repository at this point in the history
change error msg when section var are cleared
  • Loading branch information
gares authored Jan 26, 2024
2 parents 0451f1b + 3af8b2c commit e77a0be
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/coq_elpi_HOAS.ml
Original file line number Diff line number Diff line change
Expand Up @@ -1306,7 +1306,10 @@ let rec constr2lp coq_ctx ~calldepth ~depth state t =
let state, elpi_uvk, _, gsl_t = in_elpi_evar ~calldepth k state in
gls := gsl_t @ !gls;
let args = Evd.expand_existential sigma (k, args) in
let args = CList.firstn (List.length args - coq_ctx.section_len) args in
let argno = List.length args - coq_ctx.section_len in
if (argno < 0) then
nYI "constr2lp: cleared section variables";
let args = CList.firstn argno args in
let state, args = CList.fold_left_map (aux ~depth env) state args in
state, E.mkUnifVar elpi_uvk ~args:(List.rev args) state
| C.Sort s -> in_elpi_sort ~depth state (EC.ESorts.kind sigma s)
Expand Down

0 comments on commit e77a0be

Please sign in to comment.