| 1 |
Require Import Ltac2.Ltac2. |
| 2 |
|
| 3 |
Definition foo : nat := 1. |
| 4 |
Opaque foo. |
| 5 |
|
| 6 |
Goal True /\ False. |
| 7 |
(* conversion works *) |
| 8 |
Control.assert_true (Unification.conv_full '4 '(2 + 2)). |
| 9 |
(* conversion fails *) |
| 10 |
Fail Control.assert_true (Unification.conv_full '4 '3). |
| 11 |
(* at most one goal must be focussed *) |
| 12 |
split. Fail all: Unification.conv_full '4 '(2 + 2). |
| 13 |
(* constants are respected *) |
| 14 |
Fail Control.assert_true (Unification.conv_current 'foo '1). |
| 15 |
Control.assert_true (Unification.conv_full 'foo '1). |
| 16 |
(* its the local env that is used *) |
| 17 |
pose (x := 1); Control.assert_true (Unification.conv_full '&x '1). |
| 18 |
Abort. |