aboutsummaryrefslogtreecommitdiff
path: root/test-suite
diff options
context:
space:
mode:
authorcoqbot-app[bot]2020-11-20 08:49:36 +0000
committerGitHub2020-11-20 08:49:36 +0000
commitf264aabf59866ae0d18509a7757e69c26e82f508 (patch)
tree6cfa5cca2c0745a54ac0c53c1bf93787d037bd0f /test-suite
parent345328cdbcc6e01c884d7e91a72630ee54810d5c (diff)
parent0fff401b5c12a2d0684c8ff4980ebd9716f93905 (diff)
Merge PR #13371: Extend hack to use postponed constraints in retyping to template poly
Reviewed-by: gares Reviewed-by: herbelin
Diffstat (limited to 'test-suite')
-rw-r--r--test-suite/bugs/closed/bug_13366.v5
-rw-r--r--test-suite/bugs/closed/bug_9809.v30
2 files changed, 35 insertions, 0 deletions
diff --git a/test-suite/bugs/closed/bug_13366.v b/test-suite/bugs/closed/bug_13366.v
new file mode 100644
index 0000000000..06918a9266
--- /dev/null
+++ b/test-suite/bugs/closed/bug_13366.v
@@ -0,0 +1,5 @@
+Class Functor (F : Type -> Type) : Type :=
+ fmap : F nat.
+
+Fail Definition blah := sum fmap.
+(* used to be anomaly not an arity *)
diff --git a/test-suite/bugs/closed/bug_9809.v b/test-suite/bugs/closed/bug_9809.v
new file mode 100644
index 0000000000..4a7d2c7fac
--- /dev/null
+++ b/test-suite/bugs/closed/bug_9809.v
@@ -0,0 +1,30 @@
+Section FreeMonad.
+
+ Variable S : Type.
+ Variable P : S -> Type.
+
+ Inductive FreeF A : Type :=
+ | retFree : A -> FreeF A
+ | opr : forall s, (P s -> FreeF A) -> FreeF A.
+
+End FreeMonad.
+
+Section Fibonnacci.
+
+ Inductive gen_op := call_op : nat -> gen_op.
+ Definition gen_ty (op : gen_op) :=
+ match op with
+ | call_op _ => nat
+ end.
+
+ Fail Definition fib0 (n:nat) : FreeF gen_op gen_ty nat :=
+ match n with
+ | 0
+ | 1 => retFree _ _ _ 1
+ | S (S k) =>
+ opr _ _ _ (call_op (S k))
+ (fun r1 => opr _ _ _ (call_op k)
+ (fun r0 => retFree (* _ _ _ *) (r1 + r0)))
+ end.
+
+End Fibonnacci.