~ubuntu-branches/ubuntu/wily/coq-doc/wily

« back to all changes in this revision

Viewing changes to test-suite/output/Cases.v

  • Committer: Bazaar Package Importer
  • Author(s): Stéphane Glondu, Stéphane Glondu, Samuel Mimram
  • Date: 2010-01-07 22:50:39 UTC
  • mfrom: (1.2.2 upstream)
  • Revision ID: james.westby@ubuntu.com-20100107225039-n3cq82589u0qt0s2
Tags: 8.2pl1-1
[ Stéphane Glondu ]
* New upstream release (Closes: #563669)
  - remove patches
* Packaging overhaul:
  - use git, advertise it in Vcs-* fields of debian/control
  - use debhelper 7 and dh with override
  - use source format 3.0 (quilt)
* debian/control:
  - set Maintainer to d-o-m, set Uploaders to Sam and myself
  - add Homepage field
  - bump Standards-Version to 3.8.3
* Register PDF documentation into doc-base
* Add debian/watch
* Update debian/copyright

[ Samuel Mimram ]
* Change coq-doc's description to mention that it provides documentation in
  pdf format, not postscript, closes: #543545.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
(* Cases with let-in in constructors types *)
 
2
 
 
3
Inductive t : Set :=
 
4
    k : let x := t in x -> x.
 
5
 
 
6
Print t_rect.
 
7
 
 
8
(* Do not contract nested patterns with dependent return type *)
 
9
(* see bug #1699 *)
 
10
 
 
11
Require Import Arith.
 
12
 
 
13
Definition proj (x y:nat) (P:nat -> Type) (def:P x) (prf:P y) : P y :=
 
14
  match eq_nat_dec x y return P y with
 
15
  | left eqprf => 
 
16
    match eqprf in (_ = z) return (P z) with
 
17
    | refl_equal => def
 
18
    end
 
19
  | _ => prf
 
20
 end.
 
21
 
 
22
Print proj.
 
23
 
 
24
(* Use notations even below aliases *)
 
25
 
 
26
Require Import List.
 
27
 
 
28
Fixpoint foo (A:Type) (l:list A) : option A :=
 
29
  match l with
 
30
  | nil => None
 
31
  | x0 :: nil => Some x0
 
32
  | x0 :: (x1 :: xs) as l0 => foo A l0
 
33
  end.
 
34
 
 
35
Print foo.
 
36
 
 
37
(* Do not duplicate the matched term *)
 
38
 
 
39
Axiom A : nat -> bool.
 
40
 
 
41
Definition foo' :=
 
42
  match A 0 with
 
43
    | true => true
 
44
    | x => x
 
45
  end.
 
46
 
 
47
Print foo'.
 
48