diff options
| author | Pierre-Marie Pédrot | 2019-06-08 15:08:51 +0200 |
|---|---|---|
| committer | Pierre-Marie Pédrot | 2019-06-25 17:38:35 +0200 |
| commit | c3efcc501e140a74a948513a0e45223e4d5b521c (patch) | |
| tree | b0b2254addfe26859f73a93ae859ab4a04912e7b /test-suite | |
| parent | 7dfcb0f7c817e66280ab37b6c653b5596a16c249 (diff) | |
Adding the ability to transfer Ltac2 variables to Ltac1 quotations.
Diffstat (limited to 'test-suite')
| -rw-r--r-- | test-suite/ltac2/compat.v | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/test-suite/ltac2/compat.v b/test-suite/ltac2/compat.v index 489fa638e4..a24c9af10d 100644 --- a/test-suite/ltac2/compat.v +++ b/test-suite/ltac2/compat.v @@ -27,6 +27,22 @@ Fail Ltac2 bar nay := ltac1:(discriminate nay). Fail Ltac2 pose1 (v : constr) := ltac1:(pose $v). +(** Variables explicitly crossing the boundary must satisfy typing properties *) +Goal True. +Proof. +(* Missing variable *) +Fail ltac1:(x |- idtac). +(* Wrong type *) +Fail let x := 0 in ltac1:(x |- idtac). +(* OK, and runtime has access to variable *) +let x := Ltac1.of_constr constr:(Type) in ltac1:(x |- idtac x). + +(* Same for ltac1val *) +Fail Ltac1.run ltac1val:(x |- idtac). +Fail let x := 0 in Ltac1.run ltac1val:(x |- idtac). +let x := Ltac1.of_constr constr:(Type) in Ltac1.run ltac1val:(x |- idtac x). +Abort. + (** Test calls to Ltac2 from Ltac1 *) Set Default Proof Mode "Classic". |
