Skip to content

Commit c0d3276

Browse files
committed
fix: HOAS impargs of record
1 parent 6d94efa commit c0d3276

File tree

2 files changed

+9
-1
lines changed

2 files changed

+9
-1
lines changed

src/coq_elpi_HOAS.ml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2972,7 +2972,7 @@ let lp2inductive_entry ~depth coq_ctx constraints state t =
29722972
let state, fields_names_coercions, kty = aux_fields (depth+1) state ind fields in
29732973
let k = [E.mkApp constructorc kn [in_elpi_arity kty]] in
29742974
let state, idecl, uctx, ubinders, i_impls, ks_impls, gl2 =
2975-
aux_construtors (push_coq_ctx_local depth e coq_ctx) ~depth:(depth+1) (params,impls) ([],[]) arity iname Declarations.BiFinite
2975+
aux_construtors (push_coq_ctx_local depth e coq_ctx) ~depth:(depth+1) (params,List.rev impls) ([],[]) arity iname Declarations.BiFinite
29762976
state k in
29772977
let primitive = coq_ctx.options.primitive = Some true in
29782978
state, (idecl, uctx, ubinders, Some (primitive,fields_names_coercions), [i_impls, ks_impls]), List.(concat (rev (gl2 :: gl1 :: extra)))

tests/test_HOAS.v

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -616,3 +616,11 @@ coq.env.add-indt D _,
616616
coq.env.end-module _
617617
}}.
618618

619+
620+
Elpi Command Comm.
621+
Elpi Accumulate lp:{{
622+
main [indt-decl X] :- coq.say X,
623+
coq.env.add-indt X _.
624+
}}.
625+
Elpi Comm Class c {A : Type} (x : A -> A).
626+
Goal c S. Abort.

0 commit comments

Comments
 (0)