diff options
author | Samuel Mimram <samuel.mimram@ens-lyon.org> | 2004-07-28 21:54:47 +0000 |
---|---|---|
committer | Samuel Mimram <samuel.mimram@ens-lyon.org> | 2004-07-28 21:54:47 +0000 |
commit | 6b649aba925b6f7462da07599fe67ebb12a3460e (patch) | |
tree | 43656bcaa51164548f3fa14e5b10de5ef1088574 /test-suite/success/implicit.v |
Imported Upstream version 8.0pl1upstream/8.0pl1
Diffstat (limited to 'test-suite/success/implicit.v')
-rw-r--r-- | test-suite/success/implicit.v | 31 |
1 files changed, 31 insertions, 0 deletions
diff --git a/test-suite/success/implicit.v b/test-suite/success/implicit.v new file mode 100644 index 00000000..c597f9bf --- /dev/null +++ b/test-suite/success/implicit.v @@ -0,0 +1,31 @@ +(* Implicit on section variables *) + +Set Implicit Arguments. + +(* Example submitted by David Nowak *) + +Section Spec. +Variable A:Set. +Variable op : (A:Set)A->A->Set. +Infix 6 "#" op V8only (at level 70). +Check (x:A)(x # x). + +(* Example submitted by Christine *) +Record stack : Type := {type : Set; elt : type; + empty : type -> bool; proof : (empty elt)=true }. + +Check (type:Set; elt:type; empty:(type->bool))(empty elt)=true->stack. + +End Spec. + +(* Example submitted by Frédéric (interesting in v8 syntax) *) + +Parameter f : nat -> nat * nat. +Notation lhs := fst. +Check [x](lhs ? ? (f x)). +Check [x](!lhs ? ? (f x)). +Notation "'rhs'" := snd. +Check [x](rhs ? ? (f x)). +(* V8 seulement +Check (fun x => @ rhs ? ? (f x)). +*) |