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

« back to all changes in this revision

Viewing changes to test-suite/output/Implicit.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
Set Implicit Arguments.
 
2
Unset Strict Implicit.
 
3
 
 
4
(* Suggested by Pierre Casteran (bug #169) *)
 
5
(* Argument 3 is needed to typecheck and should be printed *)
 
6
Definition compose (A B C : Set) (f : A -> B) (g : B -> C) (x : A) := g (f x).
 
7
Check (compose (C:=nat) S).
 
8
 
 
9
(* Better to explicitly display the arguments inferable from a
 
10
   position that could disappear after reduction *)
 
11
Inductive ex (A : Set) (P : A -> Prop) : Prop :=
 
12
    ex_intro : forall x : A, P x -> ex P.
 
13
Check (ex_intro (P:=fun _ => True) (x:=0) I).
 
14
 
 
15
(* Test for V8 printing of implicit by names *)
 
16
Definition d1 y x (h : x = y :>nat) := h.
 
17
Definition d2 x := d1 (y:=x).
 
18
 
 
19
Print d2.
 
20
 
 
21
(* Check maximal insertion of implicit *)
 
22
 
 
23
Require Import List.
 
24
 
 
25
Open Scope list_scope.
 
26
 
 
27
Set Implicit Arguments.
 
28
Set Maximal Implicit Insertion.
 
29
 
 
30
Definition id (A:Type) (x:A) := x.
 
31
 
 
32
Check map id (1::nil).
 
33
 
 
34
Definition id' (A:Type) (x:A) := x.
 
35
 
 
36
Implicit Arguments id' [[A]].
 
37
 
 
38
Check map id' (1::nil).