Skip to content

Commit

Permalink
Merge pull request #526 from SkySkimmer/redbehaviour-pred
Browse files Browse the repository at this point in the history
 Adapt to coq/coq#18187 (reductionbehaviour is on constant not gref)
  • Loading branch information
ppedrot authored Oct 26, 2023
2 parents f494235 + fdcce15 commit 7075a45
Showing 1 changed file with 11 additions and 4 deletions.
15 changes: 11 additions & 4 deletions src/coq_elpi_builtins.ml
Original file line number Diff line number Diff line change
Expand Up @@ -2994,7 +2994,11 @@ Supported attributes:
Out(option simplification_strategy,"Strategy",
Easy "reads the behavior of the simplification tactics. Positions are 0 based. See also the ! and / modifiers for the Arguments command")),
(fun gref _ ~depth ->
!: (Reductionops.ReductionBehaviour.get gref))),
let flags = match gref with
| ConstRef c -> Reductionops.ReductionBehaviour.get c
| _ -> None
in
!: flags)),
DocAbove);

MLCode(Pred("coq.arguments.set-simplification",
Expand All @@ -3007,9 +3011,12 @@ See also the ! and / modifiers for the Arguments command.
Supported attributes:
- @global! (default: false)|}))),
(fun gref strategy ~depth { options } _ -> grab_global_env "coq.arguments.set-simplification" (fun state ->
let local = options.local <> Some false in
Reductionops.ReductionBehaviour.set ~local gref strategy;
state, (), []))),
match gref with
| ConstRef gref ->
let local = options.local <> Some false in
Reductionops.ReductionBehaviour.set ~local gref strategy;
state, (), []
| _ -> err Pp.(str "set-simplification must be called on constant")))),
DocAbove);

MLCode(Pred("coq.locate-abbreviation",
Expand Down

0 comments on commit 7075a45

Please sign in to comment.