coq-club AT inria.fr
Subject: The Coq mailing list
List archive
- From: Adam Chlipala <adam AT chlipala.net>
- To: Chris Dams <chris.dams.nl AT gmail.com>
- Cc: coq-club AT inria.fr
- Subject: Re: [Coq-Club] Coq pattern matching going crazy on me -> looks like a bug.
- Date: Sun, 14 Feb 2010 09:58:31 -0500
That definitely looks like a bug. Still, I think there's an easier way to implement the function that you seem to want to implement, and this way doesn't hit any noticeable bug.
Inductive type : Set :=
| int : type
| Cbool : type
| ref : type -> type.
Definition value_set (t : type) :=
match t with
| int => nat
| Cbool => bool
| ref _ => nat
end.
Inductive test : forall t, value_set t -> Prop :=
| test1 : forall t, test (ref t) 3
| test2 : test Cbool true.
Definition test_not_int (H : test int 5) : False :=
match H in test T _ return match T return Prop with
| int => False
| _ => True
end with
| test1 _ => I
| _ => I
end.
- [Coq-Club] Coq pattern matching going crazy on me -> looks like a bug., Chris Dams
- Re: [Coq-Club] Coq pattern matching going crazy on me -> looks like a bug., Adam Chlipala
- Re: [Coq-Club] Coq pattern matching going crazy on me -> looks like a bug., Hugo Herbelin
Archive powered by MhonArc 2.6.16.