diff options
author | msozeau <msozeau@85f007b7-540e-0410-9357-904b9bb8a0f7> | 2008-03-15 11:54:17 +0000 |
---|---|---|
committer | msozeau <msozeau@85f007b7-540e-0410-9357-904b9bb8a0f7> | 2008-03-15 11:54:17 +0000 |
commit | ab8c213b7a4873265e325d0f8da0744bf31d96be (patch) | |
tree | fd33e8e0d9065acccaa446609069c24a2b3db270 | |
parent | e0d81e2e0f4051c1bcf25b923cef4699cd48c535 (diff) |
Forgot the test file.
git-svn-id: svn+ssh://scm.gforge.inria.fr/svn/coq/trunk@10678 85f007b7-540e-0410-9357-904b9bb8a0f7
-rw-r--r-- | test-suite/success/ImplicitArguments.v | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/test-suite/success/ImplicitArguments.v b/test-suite/success/ImplicitArguments.v new file mode 100644 index 000000000..e7795733f --- /dev/null +++ b/test-suite/success/ImplicitArguments.v @@ -0,0 +1,17 @@ +Inductive vector {A : Type} : nat -> Type := +| vnil : vector 0 +| vcons : A -> forall {n'}, vector n' -> vector (S n'). + +Require Import Coq.Program.Program. + +Program Definition head {A : Type} {n : nat} (v : vector A (S n)) : vector A n := + match v with + | vnil => ! + | vcons a n' v' => v' + end. + +Fixpoint app {A : Type} {n m : nat} (v : vector A n) (w : vector A m) : vector A (n + m) := + match v in vector _ n return vector A (n + m) with + | vnil => w + | vcons a n' v' => vcons a (app v' w) + end. |