theories/Ltac2/Reference.v
raw| 1 | Require Import Ltac2.Init. |
| 2 | Require Ltac2.Std Ltac2.Ident Ltac2.Ind Ltac2.Constructor Ltac2.Constant. |
| 3 | |
| 4 | Ltac2 Type t := Std.reference. |
| 5 | Import Ltac2.Std. |
| 6 | |
| 7 | Ltac2 equal r1 r2 := |
| 8 | match r1, r2 with |
| 9 | | VarRef i1, VarRef i2 => Ident.equal i1 i2 |
| 10 | | ConstRef c1, ConstRef c2 => Constant.equal c1 c2 |
| 11 | | IndRef ind1, IndRef ind2 => Ind.equal ind1 ind2 |
| 12 | | ConstructRef cstr1, ConstructRef cstr2 => Constructor.equal cstr1 cstr2 |
| 13 | | _, _ => false |
| 14 | end. |