aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormsozeau2007-02-01 12:00:51 +0000
committermsozeau2007-02-01 12:00:51 +0000
commit3d519597dc4a8f86995297c5b013f1b4f87c73e2 (patch)
tree167ca5358c026281e6bfc087ddc20bacec5e163f
parent260154605b0bf568238973844b80c24cceede423 (diff)
Abbreviation of order notation.
git-svn-id: svn+ssh://scm.gforge.inria.fr/svn/coq/trunk@9576 85f007b7-540e-0410-9357-904b9bb8a0f7
-rw-r--r--contrib/subtac/test/ListsTest.v1
-rw-r--r--contrib/subtac/test/euclid.v4
-rw-r--r--parsing/g_constr.ml44
-rw-r--r--parsing/g_vernac.ml44
4 files changed, 7 insertions, 6 deletions
diff --git a/contrib/subtac/test/ListsTest.v b/contrib/subtac/test/ListsTest.v
index cc11c15136..b8d13fe6bc 100644
--- a/contrib/subtac/test/ListsTest.v
+++ b/contrib/subtac/test/ListsTest.v
@@ -74,4 +74,3 @@ Section Nth.
Defined.
End Nth.
-Section
diff --git a/contrib/subtac/test/euclid.v b/contrib/subtac/test/euclid.v
index e793e270db..a5a8b85f99 100644
--- a/contrib/subtac/test/euclid.v
+++ b/contrib/subtac/test/euclid.v
@@ -2,7 +2,7 @@ Require Import Coq.subtac.Utils.
Require Import Coq.Arith.Compare_dec.
Notation "( x & y )" := (existS _ x y) : core_scope.
-Program Fixpoint euclid (a : nat) (b : { b : nat | b <> O }) {wf a lt} :
+Program Fixpoint euclid (a : nat) (b : { b : nat | b <> O }) {wf lt a} :
{ q : nat & { r : nat | a = b * q + r /\ r < b } } :=
if le_lt_dec b a then let (q', r) := euclid (a - b) b in
(S q' & r)
@@ -23,3 +23,5 @@ Eval lazy beta zeta delta iota in test_euclid.
Program Definition testsig (a : nat) : { x : nat & { y : nat | x < y } } :=
(a & S a).
+
+Check testsig.
diff --git a/parsing/g_constr.ml4 b/parsing/g_constr.ml4
index 9a50eb897e..b29b82607f 100644
--- a/parsing/g_constr.ml4
+++ b/parsing/g_constr.ml4
@@ -231,8 +231,8 @@ GEXTEND Gram
;
fixannot:
[ [ "{"; IDENT "struct"; id=name; "}" -> (Some id, CStructRec)
- | "{"; IDENT "wf"; rel=constr; id=name; "}" -> (Some id, CWfRec rel)
- | "{"; IDENT "measure"; rel=constr; id=name; "}" -> (Some id, CMeasureRec rel)
+ | "{"; IDENT "wf"; rel=constr; id=OPT name; "}" -> (id, CWfRec rel)
+ | "{"; IDENT "measure"; rel=constr; id=OPT name; "}" -> (id, CMeasureRec rel)
| -> (None, CStructRec)
] ]
;
diff --git a/parsing/g_vernac.ml4 b/parsing/g_vernac.ml4
index ad1e3abb78..8174271d93 100644
--- a/parsing/g_vernac.ml4
+++ b/parsing/g_vernac.ml4
@@ -266,8 +266,8 @@ GEXTEND Gram
;
rec_annotation:
[ [ "{"; IDENT "struct"; id=IDENT; "}" -> (Some (id_of_string id), CStructRec)
- | "{"; IDENT "wf"; rel=constr; id=IDENT; "}" -> (Some (id_of_string id), CWfRec rel)
- | "{"; IDENT "measure"; rel=constr; id=IDENT; "}" -> (Some (id_of_string id), CMeasureRec rel)
+ | "{"; IDENT "wf"; rel=constr; id=OPT IDENT; "}" -> (option_map id_of_string id, CWfRec rel)
+ | "{"; IDENT "measure"; rel=constr; id=OPT IDENT; "}" -> (option_map id_of_string id, CMeasureRec rel)
| -> (None, CStructRec)
] ]
;