Skip to content
Draft
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
26 changes: 18 additions & 8 deletions src/rocq_elpi_builtins.ml
Original file line number Diff line number Diff line change
Expand Up @@ -1686,7 +1686,7 @@ exception TacticFails of Exninfo.iexn

let call_tactic ~depth state ~no_tc proof_context goal tactic =
let sigma = get_sigma state in
try
try
let sigma, subgoals =
let open Proofview in let open Notations in
let focused_tac =
Expand Down Expand Up @@ -1934,6 +1934,20 @@ let univ_binder_compat_820 a b = a
let univ_binder_compat_820 a b = b
[%%endif]

[%%if coq = "9.0" || coq = "9.1" || coq = "9.2"]
let declare_scheme local k rf gr =
let ind =
match x with
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is the wrong variable, this code doesn't compile actually.

| GlobRef.IndRef i -> i
| _ -> U.type_error "Register_scheme: expecting an inductive"
in
declare_scheme local k (ind,for_scheme gr)
[%%else]
let declare_scheme local k rf gr =
declare_scheme local k (rf,for_scheme gr)
[%%endif]


let coq_rest_builtins =
let open API.BuiltIn in
let open Pred in
Expand Down Expand Up @@ -2322,7 +2336,7 @@ Supported attributes:
let section,l = section_close_section s in
List.concat_map (function
| Section.SecDefinition c -> [GlobRef.ConstRef c]
| Section.SecInductive m ->
| Section.SecInductive m ->
let { Declarations.mind_packets } = Environ.lookup_mind m (Safe_typing.env_of_safe_env safe_env) in
List.init (Array.length mind_packets) (fun i -> GlobRef.IndRef(m,i))
) l :: aux section
Expand Down Expand Up @@ -4230,7 +4244,7 @@ In order to call the code between curly braces one has to run

Note that each TACTIC EXTEND block can have many entries and their numbering
starts from 0. Also, each block has a name, "Lia" in this case.

When the diagnostic is (error Msg), then GL is not set.

Supported attributes:
Expand Down Expand Up @@ -4613,11 +4627,7 @@ Supported attributes:
state, (), []
| Scheme(x,k) ->
let k = string_of_scheme_kind k in
let ind =
match x with
| GlobRef.IndRef i -> i
| _ -> U.type_error "Register_scheme: expecting an inductive" in
declare_scheme local k (ind,for_scheme gr);
declare_scheme local k x gr;
state, (), []
)),
DocAbove);
Expand Down
Loading