Skip to content

Commit 756c36c

Browse files
ppedrotliyishuai
authored andcommitted
1 parent 506d298 commit 756c36c

File tree

14 files changed

+41
-2
lines changed

14 files changed

+41
-2
lines changed

examples/StateTMonad.v

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ Fail Definition foo : stateT unit option unit :=
88
ret tt.
99

1010
(** Use [Existing Instance] to bring the Local [Monad_stateT] instance into context *)
11-
Existing Instance Monad_stateT.
11+
#[global] Existing Instance Monad_stateT.
1212

1313
(** Now the definition succeeds *)
1414
Definition foo : stateT unit option unit :=

theories/Core/Any.v

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,4 +10,5 @@ Polymorphic Definition RESOLVE (T : Type) : Type := T.
1010

1111
Existing Class RESOLVE.
1212

13+
#[global]
1314
Hint Extern 0 (RESOLVE _) => unfold RESOLVE : typeclass_instances.

theories/Data/Eq.v

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,9 @@
44
Set Implicit Arguments.
55
Set Strict Implicit.
66

7+
(** For backwards compatibility with hint locality attributes. *)
8+
Set Warnings "-unsupported-attributes".
9+
710
Create HintDb eq_rw discriminated.
811

912
Lemma eq_sym_eq
@@ -28,6 +31,7 @@ Lemma match_eq_sym_eq
2831
Proof.
2932
destruct pf. reflexivity.
3033
Defined.
34+
#[global]
3135
Hint Rewrite match_eq_sym_eq : eq_rw.
3236

3337
Lemma match_eq_sym_eq'
@@ -40,6 +44,7 @@ Lemma match_eq_sym_eq'
4044
Proof.
4145
destruct pf. reflexivity.
4246
Defined.
47+
#[global]
4348
Hint Rewrite match_eq_sym_eq' : eq_rw.
4449

4550

@@ -73,6 +78,7 @@ Lemma eq_Const_eq
7378
Proof.
7479
destruct pf. reflexivity.
7580
Defined.
81+
#[global]
7682
Hint Rewrite eq_Const_eq : eq_rw.
7783

7884
Lemma eq_Arr_eq
@@ -88,11 +94,13 @@ Lemma eq_Arr_eq
8894
Proof.
8995
destruct pf. reflexivity.
9096
Defined.
97+
#[global]
9198
Hint Rewrite eq_Arr_eq : eq_rw.
9299

93100
Lemma eq_sym_eq_sym : forall (T : Type) (a b : T) (pf : a = b),
94101
eq_sym (eq_sym pf) = pf.
95102
Proof. destruct pf. reflexivity. Defined.
103+
#[global]
96104
Hint Rewrite eq_sym_eq_sym : eq_rw.
97105

98106
Ltac autorewrite_eq_rw :=

theories/Data/ListFirstnSkipn.v

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,9 @@ Require Import Coq.Lists.List.
22
Require Import Coq.ZArith.ZArith.
33
Require Import Coq.micromega.Lia.
44

5+
(** For backwards compatibility with hint locality attributes. *)
6+
Set Warnings "-unsupported-attributes".
7+
58
Lemma firstn_app_L : forall T n (a b : list T),
69
n <= length a ->
710
firstn n (a ++ b) = firstn n a.
@@ -45,6 +48,7 @@ Proof.
4548
simpl. replace (n - 0) with n; [ | lia ]. reflexivity.
4649
Qed.
4750

51+
#[global]
4852
Hint Rewrite firstn_app_L firstn_app_R firstn_all firstn_0 firstn_cons using lia : list_rw.
4953

5054
Lemma skipn_app_R : forall T n (a b : list T),
@@ -90,4 +94,5 @@ Proof.
9094
simpl. replace (n - 0) with n; [ | lia ]. reflexivity.
9195
Qed.
9296

97+
#[global]
9398
Hint Rewrite skipn_app_L skipn_app_R skipn_0 skipn_all skipn_cons using lia : list_rw.

theories/Data/Option.v

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,9 @@ Require Import ExtLib.Tactics.Consider.
1414
Set Implicit Arguments.
1515
Set Strict Implicit.
1616

17+
(** For backwards compatibility with hint locality attributes. *)
18+
Set Warnings "-unsupported-attributes".
19+
1720
Global Instance Foldable_option {T} : Foldable (option T) T :=
1821
fun _ f d v =>
1922
match v with
@@ -180,4 +183,5 @@ Proof.
180183
destruct pf. destruct val; reflexivity.
181184
Defined.
182185

186+
#[global]
183187
Hint Rewrite eq_option_eq : eq_rw.

theories/Data/PList.v

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -216,6 +216,7 @@ End pmap.
216216

217217
Polymorphic Definition Functor_plist@{i} : Functor@{i i} plist@{i} :=
218218
{| fmap := @fmap_plist@{i i} |}.
219+
#[global]
219220
Existing Instance Functor_plist.
220221

221222

theories/Data/POption.v

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -80,9 +80,11 @@ End poption_map.
8080

8181
Definition Functor_poption@{i} : Functor@{i i} poption@{i} :=
8282
{| fmap := @fmap_poption@{i i} |}.
83+
#[global]
8384
Existing Instance Functor_poption.
8485

8586
Definition Applicative_poption@{i} : Applicative@{i i} poption@{i} :=
8687
{| pure := @pSome@{i}
8788
; ap := @ap_poption |}.
89+
#[global]
8890
Existing Instance Applicative_poption.

theories/Data/SigT.v

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,9 @@ Set Implicit Arguments.
77
Set Strict Implicit.
88
Set Printing Universes.
99

10+
(** For backwards compatibility with hint locality attributes. *)
11+
Set Warnings "-unsupported-attributes".
12+
1013
Section injective.
1114
Variable T : Type.
1215
Variable F : T -> Type.
@@ -39,4 +42,5 @@ Lemma eq_sigT_rw
3942
end.
4043
Proof. destruct pf. destruct s; reflexivity. Qed.
4144

45+
#[global]
4246
Hint Rewrite eq_sigT_rw : eq_rw.

theories/Generic/Ind.v

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -132,7 +132,9 @@ Ltac all_resolve :=
132132
| |- _ => solve [ eauto with typeclass_instances ]
133133
end.
134134

135+
#[global]
135136
Hint Extern 0 (ProductResolve _ _) => all_resolve : typeclass_instances.
137+
#[global]
136138
Hint Extern 0 (VariantResolve _ _) => all_resolve : typeclass_instances.
137139

138140
Definition comma_before (b : bool) (s : showM) : showM :=

theories/Programming/Eqv.v

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ Class EqvWF T :=
99
{ eqvWFEqv :> Eqv T
1010
; eqvWFEquivalence :> Equivalence eqv
1111
}.
12+
#[global]
1213
Instance EqvWF_Build {T} {E:Eqv T} {EV:Equivalence eqv} : EqvWF T :=
1314
{ eqvWFEqv := E ; eqvWFEquivalence := EV }.
1415

0 commit comments

Comments
 (0)