aboutsummaryrefslogtreecommitdiffhomepage
path: root/theories/Classes/EquivDec.v
diff options
context:
space:
mode:
authorGravatar msozeau <msozeau@85f007b7-540e-0410-9357-904b9bb8a0f7>2008-03-28 20:22:43 +0000
committerGravatar msozeau <msozeau@85f007b7-540e-0410-9357-904b9bb8a0f7>2008-03-28 20:22:43 +0000
commit6bd55e5c17463d3868becba4064dba46c95c4028 (patch)
treed9883d5846ada3e5f0d049d711da7a1414f410ad /theories/Classes/EquivDec.v
parent5bb2935198434eceea41e1b966b56a175def396d (diff)
- Second pass on implementation of let pattern. Parse "let ' par [as x]?
[in I] := t [return pred] in b", just as SSReflect does with let:. Change implementation: no longer a separate AST node, just add a case_style annotation on Cases to indicate it (if ML was dependently typed we could ensure that LetPatternStyle Cases have only one term to be matched and one branch, alas...). This factors out most code and we lose no functionality (win ! win !). Add LetPat.v test suite. - Slight improvement of inference of return clauses for dependent pattern matching. If matching a variable of non-dependent type under a tycon that mentions it while giving no return clause, the dependency will be automatically infered. Examples at the end of DepPat. Should get rid of most explicit returns under tycons. git-svn-id: svn+ssh://scm.gforge.inria.fr/svn/coq/trunk@10727 85f007b7-540e-0410-9357-904b9bb8a0f7
Diffstat (limited to 'theories/Classes/EquivDec.v')
-rw-r--r--theories/Classes/EquivDec.v4
1 files changed, 2 insertions, 2 deletions
diff --git a/theories/Classes/EquivDec.v b/theories/Classes/EquivDec.v
index 085023720..d215bccb9 100644
--- a/theories/Classes/EquivDec.v
+++ b/theories/Classes/EquivDec.v
@@ -97,8 +97,8 @@ Program Instance unit_eqdec : ! EqDec unit eq :=
Program Instance [ EqDec A eq, EqDec B eq ] =>
prod_eqdec : ! EqDec (prod A B) eq :=
equiv_dec x y :=
- dest x as (x1, x2) in
- dest y as (y1, y2) in
+ let '(x1, x2) := x in
+ let '(y1, y2) := y in
if x1 == y1 then
if x2 == y2 then in_left
else in_right