Skip to content

Commit c95de28

Browse files
authored
Merge pull request #770 from proux01/fix-766
Fix #766
2 parents fde097c + a829056 commit c95de28

File tree

2 files changed

+14
-1
lines changed

2 files changed

+14
-1
lines changed

src/coq_elpi_HOAS.mli

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -110,9 +110,15 @@ val lp2skeleton :
110110
type coercion_status = Regular | Off | Reversible
111111
type record_field_spec = { name : Name.t; is_coercion : coercion_status; is_canonical : bool }
112112

113+
[%%if coq = "8.20" || coq = "9.0"]
114+
val lp2inductive_entry :
115+
depth:int -> empty coq_context -> constraints -> State.t -> term ->
116+
State.t * (DeclareInd.default_dep_elim list * Entries.mutual_inductive_entry * Univ.ContextSet.t * UnivNames.universe_binders * (bool * record_field_spec list) option * DeclareInd.one_inductive_impls list) * Conversion.extra_goals
117+
[%%else]
113118
val lp2inductive_entry :
114119
depth:int -> empty coq_context -> constraints -> State.t -> term ->
115120
State.t * (DeclareInd.default_dep_elim list * Entries.mutual_inductive_entry * Univ.ContextSet.t * UState.named_universes_entry * (bool * record_field_spec list) option * DeclareInd.one_inductive_impls list) * Conversion.extra_goals
121+
[%%endif]
116122

117123
val inductive_decl2lp :
118124
depth:int -> empty coq_context -> constraints -> State.t -> (Names.MutInd.t * UVars.Instance.t * (Declarations.mutual_inductive_body * Declarations.one_inductive_body) * (Glob_term.binding_kind list * Glob_term.binding_kind list list)) ->

src/coq_elpi_builtins.ml

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1505,7 +1505,13 @@ It's a fatal error if Name cannot be located.|})),
15051505
(fun s _ ~depth:_ -> !: (locate_gref s))),
15061506
DocAbove);
15071507
]
1508-
1508+
1509+
[%%if coq = "8.20" || coq = "9.0"]
1510+
let univ_binder_compat_820 a b = a
1511+
[%%else]
1512+
let univ_binder_compat_820 a b = b
1513+
[%%endif]
1514+
15091515
let coq_rest_builtins =
15101516
let open API.BuiltIn in
15111517
let open Pred in
@@ -2101,6 +2107,7 @@ Supported attributes:
21012107
in
21022108
let () = global_push_context_set uctx in
21032109
let mind =
2110+
let univ_binders = univ_binder_compat_820 (uentry', ubinders) univ_binders in
21042111
declare_mutual_inductive_with_eliminations ~primitive_expected ~default_dep_elim me univ_binders ind_impls in
21052112
let ind = mind, 0 in
21062113
let id, cids = match me.Entries.mind_entry_inds with

0 commit comments

Comments
 (0)