| 1 |
Module Err1. |
| 2 |
Axiom u:unit. |
| 3 |
Axiom p:unit -> unit * unit. |
| 4 |
|
| 5 |
Lemma foo : let (r, n) := p u in n = n. |
| 6 |
Proof. |
| 7 |
set (t := _ u). |
| 8 |
clearbody t. |
| 9 |
destruct t as [_ []]. |
| 10 |
exact (eq_refl tt). |
| 11 |
Qed. |
| 12 |
End Err1. |
| 13 |
|
| 14 |
Module Err2. |
| 15 |
|
| 16 |
Inductive lookahead_action (term:unit) := Shift_act. |
| 17 |
|
| 18 |
Class IsValidator (P : Prop) (b : bool) := {}. |
| 19 |
|
| 20 |
Global Hint Extern 2 (IsValidator (match ?u with _ => _ end) ?b0) => |
| 21 |
let b := fresh "b" in |
| 22 |
unshelve notypeclasses refine (let b : bool := _ in _); |
| 23 |
[destruct u; intros; shelve|]; |
| 24 |
unify b b0; |
| 25 |
unfold b; destruct u; clear b |
| 26 |
: typeclass_instances. |
| 27 |
|
| 28 |
Axiom Awt : forall t:unit, lookahead_action t. |
| 29 |
|
| 30 |
Lemma foo x0 |
| 31 |
: exists g:bool, forall x1, |
| 32 |
IsValidator |
| 33 |
match x0 with |
| 34 |
| tt => |
| 35 |
match Awt x1 with |
| 36 |
| Shift_act _ => False |
| 37 |
end |
| 38 |
end g. |
| 39 |
Proof. |
| 40 |
eexists. |
| 41 |
Fail apply _. |
| 42 |
Abort. |
| 43 |
|
| 44 |
End Err2. |