Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
S
stdpp
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Monitor
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Iris
stdpp
Commits
d4458085
Commit
d4458085
authored
2 years ago
by
Robbert Krebbers
Browse files
Options
Downloads
Plain Diff
Merge branch 'robbert/tc_solve' into 'master'
Add tactic `tc_solve`. See merge request
!425
parents
d40a9005
efa1b8f0
Branches
Branches containing commit
Tags
Tags containing commit
1 merge request
!425
Add tactic `tc_solve`.
Pipeline
#74697
passed
2 years ago
Stage: build
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
CHANGELOG.md
+1
-0
1 addition, 0 deletions
CHANGELOG.md
stdpp/base.v
+17
-0
17 additions, 0 deletions
stdpp/base.v
with
18 additions
and
0 deletions
CHANGELOG.md
+
1
−
0
View file @
d4458085
...
...
@@ -7,6 +7,7 @@ API-breaking change is listed.
`difference_difference_L`
->
`difference_difference_l_L`
, add
`difference_difference_r`
and
`difference_difference_r_L`
.
-
Let
`set_solver`
use
`eauto`
(instead of
`idtac`
) as its default solver.
-
Add tactic
`tc_solve`
(this was
`iSolveTC`
in Iris).
The following
`sed`
script should perform most of the renaming
(on macOS, replace
`sed`
by
`gsed`
, installed via e.g.
`brew install gnu-sed`
).
...
...
This diff is collapsed.
Click to expand it.
stdpp/base.v
+
17
−
0
View file @
d4458085
...
...
@@ -59,6 +59,23 @@ End seal.
Global
Arguments
unseal
{_
_}
_
:
assert
.
Global
Arguments
seal_eq
{_
_}
_
:
assert
.
(** * Solving type class instances *)
(** The tactic [tc_solve] is used to solve type class goals by invoking type
class search. It is similar to [apply _], but it is more robust since it does
not affect unrelated goals/evars due to https://github.com/coq/coq/issues/6583.
The tactic [tc_solve] is particularly useful when building custom tactics that
need tight control over when type class search is invoked. In Iris, many of the
proof mode tactics make use of [notypeclasses refine] and use [tc_solve] to
manually invoke type class search.
Note that [typeclasses eauto] is multi-success. That means, whenever subsequent
tactics fail, it will backtrack to [typeclasses eauto] to try the next type
class instance. This is almost always undesired and can lead to poor performance
and horrible error messages. Hence, we wrap it in a [once]. *)
Ltac
tc_solve
:=
solve
[
once
(
typeclasses
eauto
)]
.
(** * Non-backtracking type classes *)
(** The type class [TCNoBackTrack P] can be used to establish [P] without ever
backtracking on the instance of [P] that has been found. Backtracking may
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment