diff options
| author | Hugo Herbelin | 2014-11-18 09:35:18 +0100 |
|---|---|---|
| committer | Hugo Herbelin | 2014-11-18 10:26:21 +0100 |
| commit | 8d26a1d9a3846c6cbe92a9b2f17ffac6fd7d48f5 (patch) | |
| tree | 9f2c82e75cd0e999b67c620e20311722a83e43b4 /test-suite | |
| parent | 30a9a27ce3a76e2704671174483d4b4f84c482e4 (diff) | |
Fixing detection of occurrences in the presence of nested subterms for
"simpl at" and "change at".
Diffstat (limited to 'test-suite')
| -rw-r--r-- | test-suite/success/simpl.v | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/test-suite/success/simpl.v b/test-suite/success/simpl.v index 66a92ea411..29b91e3aef 100644 --- a/test-suite/success/simpl.v +++ b/test-suite/success/simpl.v @@ -69,6 +69,7 @@ Abort. (* This is a compatibility test with a non evaluable reference, maybe not to be kept for long *) + Goal 0+0=0. simpl @eq. Abort. @@ -79,3 +80,21 @@ Goal 0+0 = 0. simpl "+". Fail set (_ + _). Abort. + +(* Check occurrences *) + +Record box A := Box { unbox : A }. + +Goal unbox _ (unbox _ (unbox _ (Box _ (Box _ (Box _ True))))) = + unbox _ (unbox _ (unbox _ (Box _ (Box _ (Box _ True))))). +simpl (unbox _ (unbox _ _)) at 1. +match goal with |- True = unbox _ (unbox _ (unbox _ (Box _ (Box _ (Box _ True))))) => idtac end. +Undo 2. +Fail simpl (unbox _ (unbox _ _)) at 5. +simpl (unbox _ (unbox _ _)) at 1 4. +match goal with |- True = unbox _ (Box _ True) => idtac end. +Undo 2. +Fail simpl (unbox _ (unbox _ _)) at 3 4. (* Nested and even overlapping *) +simpl (unbox _ (unbox _ _)) at 2 4. +match goal with |- unbox _ (Box _ True) = unbox _ (Box _ True) => idtac end. +Abort. |
