-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge PR coq#17777: Expose [Evarconv.unify] as an Ltac2 primitive.
Reviewed-by: ppedrot Reviewed-by: SkySkimmer Ack-by: Janno Ack-by: Blaisorblade Co-authored-by: SkySkimmer <SkySkimmer@users.noreply.github.com>
- Loading branch information
Showing
13 changed files
with
135 additions
and
0 deletions.
There are no files selected for viewing
6 changes: 6 additions & 0 deletions
6
doc/changelog/06-Ltac2-language/17777-evarconv-and-transparent-state.rst
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
- **Added:** | ||
new standard library modules `Ltac2.Unification` and `Ltac2.TransparentState` | ||
providing access to "Evarconv" unification, including the configuration of the | ||
transparency state | ||
(`#17777 <https://github.com/coq/coq/pull/17777>`_, | ||
by Rodolphe Lepigre). |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
(************************************************************************) | ||
(* * The Coq Proof Assistant / The Coq Development Team *) | ||
(* v * Copyright INRIA, CNRS and contributors *) | ||
(* <O___,, * (see version control and CREDITS file for authors & dates) *) | ||
(* \VV/ **************************************************************) | ||
(* // * This file is distributed under the terms of the *) | ||
(* * GNU Lesser General Public License Version 2.1 *) | ||
(* * (see LICENSE file for the text of the license) *) | ||
(************************************************************************) | ||
|
||
Require Import Ltac2.Init. | ||
|
||
(** Abstract type representing a transparency state. *) | ||
Ltac2 Type t. | ||
|
||
(** [empty] is the empty transparency state (all constants are opaque). *) | ||
Ltac2 @ external empty : t := | ||
"coq-core.plugins.ltac2" "empty_transparent_state". | ||
|
||
(** [full] is the full transparency state (all constants are transparent). *) | ||
Ltac2 @ external full : t := | ||
"coq-core.plugins.ltac2" "full_transparent_state". | ||
|
||
(** [current ()] gives the transparency state of the goal, which is influenced | ||
by, e.g., the [Strategy] command, or the [with_strategy] Ltac tactic. *) | ||
Ltac2 @ external current : unit -> t := | ||
"coq-core.plugins.ltac2" "current_transparent_state". |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
(************************************************************************) | ||
(* * The Coq Proof Assistant / The Coq Development Team *) | ||
(* v * Copyright INRIA, CNRS and contributors *) | ||
(* <O___,, * (see version control and CREDITS file for authors & dates) *) | ||
(* \VV/ **************************************************************) | ||
(* // * This file is distributed under the terms of the *) | ||
(* * GNU Lesser General Public License Version 2.1 *) | ||
(* * (see LICENSE file for the text of the license) *) | ||
(************************************************************************) | ||
|
||
Require Import Ltac2.Init. | ||
Require Ltac2.TransparentState. | ||
|
||
(** [unify ts c1 c2] unifies [c1] and [c2] (using Evarconv unification), which | ||
may have the effect of instantiating evars. If the [c1] and [c2] cannot be | ||
unified, an [Internal] exception is raised. *) | ||
Ltac2 @ external unify : TransparentState.t -> constr -> constr -> unit := | ||
"coq-core.plugins.ltac2" "evarconv_unify". | ||
|
||
(** [unify_with_full_ts] is like [unify TransparentState.full]. *) | ||
Ltac2 unify_with_full_ts : constr -> constr -> unit := fun c1 c2 => | ||
unify TransparentState.full c1 c2. | ||
|
||
(** [unify_with_current_ts] is like [unify (TransparentState.current ())]. *) | ||
Ltac2 unify_with_current_ts : constr -> constr -> unit := fun c1 c2 => | ||
unify (TransparentState.current ()) c1 c2. |