aboutsummaryrefslogtreecommitdiffhomepage
path: root/test-suite/success/Case13.v
diff options
context:
space:
mode:
authorGravatar Hugo Herbelin <Hugo.Herbelin@inria.fr>2016-08-20 16:52:12 +0200
committerGravatar Hugo Herbelin <Hugo.Herbelin@inria.fr>2016-09-26 19:47:04 +0200
commit2422aeb2b59229891508f35890653a9737988c00 (patch)
tree5dcce45254307a0914070e0862417ce66e79cc54 /test-suite/success/Case13.v
parent980b434552d73cb990860f8d659b64686f6dbc87 (diff)
Trying a no-inversion no-dependency heuristic for match return clause.
The no-inversion no-dependency heuristic was used only in the absence of type constraint. We may now use it also in the presence of a type constraint. See previous commit for discussion.
Diffstat (limited to 'test-suite/success/Case13.v')
-rw-r--r--test-suite/success/Case13.v14
1 files changed, 14 insertions, 0 deletions
diff --git a/test-suite/success/Case13.v b/test-suite/success/Case13.v
index 8f95484cf..e388acdcb 100644
--- a/test-suite/success/Case13.v
+++ b/test-suite/success/Case13.v
@@ -87,3 +87,17 @@ Check fun (x : E) => match x with c => e c end.
Inductive C' : bool -> Set := c' : C' true.
Inductive E' (b : bool) : Set := e' :> C' b -> E' b.
Check fun (x : E' true) => match x with c' => e' true c' end.
+
+(* Check use of the no-dependency strategy when a type constraint is
+ given (and when the "inversion-and-dependencies-as-evars" strategy
+ is not strong enough because of a constructor with a type whose
+ pattern structure is not refined enough for it to be captured by
+ the inversion predicate) *)
+
+Inductive K : bool -> bool -> Type := F : K true true | G x : K x x.
+
+Check fun z P Q (y:K true z) (H1 H2:P y) (f:forall y, P y -> Q y z) =>
+ match y with
+ | F => f y H1
+ | G _ => f y H2
+ end : Q y z.