coq-club AT inria.fr
Subject: The Coq mailing list
List archive
- From: gang chen <gangchen_sh AT yahoo.com>
- To: coq-club AT pauillac.inria.fr
- Subject: [Coq-Club] How to #define a macro constant ?
- Date: Sun, 29 Jun 2008 17:51:06 -0700 (PDT)
- List-archive: <http://pauillac.inria.fr/pipermail/coq-club/>
Hello all,
I'd like to define constants which can work with "match".
First, I tried
Notation Jan := 1.
Notation Feb := 2.
Definition next_month (n:nat) :=
match n with
Jan => Feb
| ...
Then, coqc shows :
Error: The constructor S expects 1 argument
Then, I tried
Notation "'Jan'" := 1.
Notation "'Feb'" := 2.
It works almost fine except that coqc gave a warning message:
Defining 'Jan' as keyword
Defining 'Feb' as key word
Is it possible to not to display these messages ?
Besides, why the two Notation definitions behave differently ?
gang chen
--
View this message in context:
http://www.nabble.com/How-to--define-a-macro-constant---tp18187095p18187095.html
Sent from the Coq mailing list archive at Nabble.com.
- [Coq-Club] How to #define a macro constant ?, gang chen
- Re: [Coq-Club] How to #define a macro constant ?, Hugo Herbelin
- Re: [Coq-Club] How to #define a macro constant ?, Jean-Francois Monin
Archive powered by MhonArc 2.6.16.