File tree 2 files changed +23
-5
lines changed
2 files changed +23
-5
lines changed Original file line number Diff line number Diff line change @@ -2781,7 +2781,7 @@ Supported attributes:
2781
2781
Supported attributes:
2782
2782
- @global! (default: true)|} ))),
2783
2783
(fun gr priority ~depth { options } _ -> grab_global_env "coq.TC.declare-instance" (fun state ->
2784
- let global = if options . local = Some false then Hints. SuperGlobal else Hints. Local in
2784
+ let global = hint_locality options in
2785
2785
let hint_priority = Some priority in
2786
2786
Classes. existing_instance global gr
2787
2787
(Some { Hints. empty_hint_info with Typeclasses. hint_priority } );
Original file line number Diff line number Diff line change @@ -15,11 +15,29 @@ Proof.
15
15
exact Rr.
16
16
Defined .
17
17
18
- Check (_ : Reflexive R).
18
+ Fail Example ex : Reflexive R := _.
19
+
20
+ Module TCLocal.
21
+ Elpi Query lp:{{ coq.locate "myi" GR, @local! => coq.TC.declare-instance GR 10. }}.
22
+ Succeed Example ex : Reflexive R := _.
23
+ End TCLocal.
24
+
25
+ Module TCExport.
26
+ Fail Example ex : Reflexive R := _.
27
+ Module Mod.
28
+ Elpi Query lp:{{ coq.locate "myi" GR, coq.TC.declare-instance GR 10. }}.
29
+ End Mod.
30
+ Fail Example ex : Reflexive R := _.
31
+ Import Mod.
32
+ Check (_ : Reflexive R).
33
+ Succeed Example ex : Reflexive R := _.
34
+ End TCExport.
35
+
36
+ Module TCGlobal.
37
+ Elpi Query lp:{{ coq.locate "myi" GR, @global! => coq.TC.declare-instance GR 10. }}.
38
+ End TCGlobal.
39
+ Succeed Example ex : Reflexive R := _.
19
40
20
- Elpi Query lp:{{coq.locate "myi" GR, coq.TC.declare-instance GR 10. }}.
21
-
22
- Check (_ : Reflexive R).
23
41
24
42
Elpi Query lp:{{coq.TC.db L}}.
25
43
Elpi Query lp:{{coq.locate "RewriteRelation" GR, coq.TC.db-for GR L}}.
You can’t perform that action at this time.
0 commit comments