aboutsummaryrefslogtreecommitdiff
path: root/test-suite
diff options
context:
space:
mode:
authorcoqbot-app[bot]2020-10-01 16:04:16 +0000
committerGitHub2020-10-01 16:04:16 +0000
commit7ffb5e663784fffb2cd6aae87bc38a5dc2f37710 (patch)
treed92f9d7972f7eed790d5eef42a143105b05e6239 /test-suite
parent1c919ed6fa476f0f7a16d69e58989f3d75104910 (diff)
parentafe7005394721b81d32ab5300325c341f99473cf (diff)
Merge PR #13123: Fix combining uniform parameters and mutual inductives.
Reviewed-by: SkySkimmer
Diffstat (limited to 'test-suite')
-rw-r--r--test-suite/bugs/closed/bug_13059.v31
1 files changed, 31 insertions, 0 deletions
diff --git a/test-suite/bugs/closed/bug_13059.v b/test-suite/bugs/closed/bug_13059.v
new file mode 100644
index 0000000000..2416e3ad13
--- /dev/null
+++ b/test-suite/bugs/closed/bug_13059.v
@@ -0,0 +1,31 @@
+Set Uniform Inductive Parameters.
+Inductive test (X : Set) : Prop :=
+with test2 (X : Set) : X -> Prop :=
+ | C (x : X) : test2 x.
+
+Require Import List.
+Import ListNotations.
+
+Set Suggest Proof Using.
+Set Primitive Projections.
+
+
+Section Grammar.
+Variable A : Type.
+
+Record grammar : Type := Grammar {
+ gm_nonterm :> Type ;
+ gm_rules :> list (gm_nonterm * list (A + gm_nonterm)) ;
+}.
+
+Set Uniform Inductive Parameters.
+Inductive lang (gm : grammar) : gm -> list A -> Prop :=
+| lang_rule S ps ws : In (S, ps) gm -> lmatch ps ws -> lang S (concat ws)
+with lmatch (gm : grammar) : list (A + gm) -> list (list A) -> Prop :=
+| lmatch_nil : lmatch [] []
+| lmatch_consL ps ws a : lmatch ps ws -> lmatch (inl a :: ps) ([a] :: ws)
+| lmatch_consR ps ws S w :
+ lang S w -> lmatch ps ws -> lmatch (inr S :: ps) (w :: ws)
+.
+
+End Grammar.