Skip to content

Commit 5632f2f

Browse files
committed
Adapt to Coq PR #19301 which unifies the syntax of Theorem, Definition and Fixpoint
1 parent c7fcee1 commit 5632f2f

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

src/coq_elpi_arg_syntax.mlg

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -181,6 +181,8 @@ let pr_attributes _ _ _ atts =
181181

182182
let wit_elpi_ftactic_arg = EA.Tac.wit
183183

184+
let binders = Procq.Constr.binders
185+
184186
let def_body = G_vernac.def_body
185187

186188
let of_coq_inductive_declaration ~atts kind id =
@@ -195,9 +197,9 @@ let of_coq_record_declaration ~atts kind id =
195197
| Inductive _ -> assert false
196198
| Record r -> r
197199

198-
let of_coq_definition ~loc ~atts name udecl def =
200+
let of_coq_definition ~loc ~atts name udecl bl def =
199201
match def with
200-
| Vernacexpr.DefineBody(bl,red,c,ty) ->
202+
| Vernacexpr.DefineBody(red,c,ty) ->
201203
EA.Cmd.(ConstantDecl { name = snd name; atts; udecl; typ = (bl,ty); red; body = Some c })
202204
| Vernacexpr.ProveBody _ ->
203205
CErrors.user_err ~loc Pp.(str"syntax error: missing Definition body")
@@ -285,8 +287,8 @@ GLOB_PRINTED BY { fun _ _ _ -> EA.Cmd.pp_glob env sigma }
285287
| [ "Structure" inductive_or_record_definition(id) ] -> { EA.Cmd.RecordDecl (of_coq_record_declaration ~atts:[] Vernacexpr.Structure id) }
286288
| [ "#[" attributes(atts) "]" "Structure" inductive_or_record_definition(id) ] -> { EA.Cmd.RecordDecl (of_coq_record_declaration ~atts Vernacexpr.Structure id) }
287289

288-
| [ "Definition" qualified_name(name) univ_decl_opt(udecl) def_body(def) ] -> { of_coq_definition ~loc ~atts:[] name udecl def }
289-
| [ "#[" attributes(atts) "]" "Definition" qualified_name(name) univ_decl_opt(udecl) def_body(def) ] -> { of_coq_definition ~loc ~atts name udecl def }
290+
| [ "Definition" qualified_name(name) univ_decl_opt(udecl) binders(bl) def_body(def) ] -> { of_coq_definition ~loc ~atts:[] name udecl bl def }
291+
| [ "#[" attributes(atts) "]" "Definition" qualified_name(name) univ_decl_opt(udecl) binders(bl) def_body(def) ] -> { of_coq_definition ~loc ~atts name udecl bl def }
290292

291293
| [ "Axiom" qualified_name(name) univ_decl_opt(udecl) telescope(typ) colon_constr(t) ] -> {
292294
EA.Cmd.(ConstantDecl { name = snd name; atts = []; udecl; typ = (typ,Some t); red = None; body = None }) }

0 commit comments

Comments
 (0)