Skip to content
Snippets Groups Projects

Prevent [finite_countable] from solving unrelated evars

Closed Paolo G. Giarrusso requested to merge Blaisorblade/stdpp:fix-finite-countable into master
1 unresolved thread
2 files
+ 15
1
Compare changes
  • Side-by-side
  • Inline
Files
2
+ 13
0
@@ -198,6 +198,19 @@ Global Existing Instance TCDiag_diag.
Global Hint Mode TCDiag ! ! ! - : typeclass_instances.
Global Hint Mode TCDiag ! ! - ! : typeclass_instances.
(** Perform at most one step of typeclass search, without affecting unrelated goals due to
https://github.com/coq/coq/issues/6583.
Useful for emulating [Hint Immediate] during TC search. Example (from [finite.v]):
<<
Global Hint Extern 1 (Countable _) =>
notypeclasses refine finite_countable; solve_tc_onestep : typeclass_instances.
>>
See docs for Iris's [iSolveTC] for further background.
Please register or sign in to reply
*)
Ltac solve_tc_onestep :=
solve [once (typeclasses eauto 1)].
(** Given a proposition [P] that is a type class, [tc_to_bool P] will return
[true] iff there is an instance of [P]. It is often useful in Ltac programming,
where one can do [lazymatch tc_to_bool P with true => .. | false => .. end]. *)
Loading