Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: HOAS impargs of record #569

Merged
merged 1 commit into from
Jan 8, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/coq_elpi_HOAS.ml
Original file line number Diff line number Diff line change
Expand Up @@ -2972,7 +2972,7 @@ let lp2inductive_entry ~depth coq_ctx constraints state t =
let state, fields_names_coercions, kty = aux_fields (depth+1) state ind fields in
let k = [E.mkApp constructorc kn [in_elpi_arity kty]] in
let state, idecl, uctx, ubinders, i_impls, ks_impls, gl2 =
aux_construtors (push_coq_ctx_local depth e coq_ctx) ~depth:(depth+1) (params,impls) ([],[]) arity iname Declarations.BiFinite
aux_construtors (push_coq_ctx_local depth e coq_ctx) ~depth:(depth+1) (params,List.rev impls) ([],[]) arity iname Declarations.BiFinite
state k in
let primitive = coq_ctx.options.primitive = Some true in
state, (idecl, uctx, ubinders, Some (primitive,fields_names_coercions), [i_impls, ks_impls]), List.(concat (rev (gl2 :: gl1 :: extra)))
Expand Down
8 changes: 8 additions & 0 deletions tests/test_HOAS.v
Original file line number Diff line number Diff line change
Expand Up @@ -124,11 +124,11 @@
}}.
Elpi Typecheck.

From Coq Require Import PrimInt63.

Check warning on line 127 in tests/test_HOAS.v

View workflow job for this annotation

GitHub Actions / build (8.19, 4.14-flambda)

Use of “Require” inside a module is fragile. It is not recommended
Open Scope int63_scope.
Elpi primitive (PrimInt63.add 2000000003333002 1).

From Coq Require Import PrimFloat.

Check warning on line 131 in tests/test_HOAS.v

View workflow job for this annotation

GitHub Actions / build (8.19, 4.14-flambda)

Use of “Require” inside a module is fragile. It is not recommended
Open Scope float_scope.
Elpi primitive (2.4e13 + 1).
End Pint.
Expand Down Expand Up @@ -616,3 +616,11 @@
coq.env.end-module _
}}.


Elpi Command Comm.
Elpi Accumulate lp:{{
main [indt-decl X] :- coq.say X,
coq.env.add-indt X _.
}}.
Elpi Comm Class c {A : Type} (x : A -> A).
Goal c S. Abort.
Loading