diff options
author | Xavier Leroy <xavier.leroy@inria.fr> | 2015-07-08 12:04:28 +0200 |
---|---|---|
committer | Xavier Leroy <xavier.leroy@inria.fr> | 2015-07-08 12:04:28 +0200 |
commit | 52c6be30048bf9b77b9dd6bc66f052ee5386f16e (patch) | |
tree | 87ab50782e40116d4b23b6f61d90030d304993dd /cparser/validator/Tuples.v | |
parent | ab1ddcd0d579d7e5760c6cfa84adbd55212c47e7 (diff) | |
parent | f869da75c970aec78975f7154c806f29e3012b7a (diff) | |
download | compcert-52c6be30048bf9b77b9dd6bc66f052ee5386f16e.tar.gz compcert-52c6be30048bf9b77b9dd6bc66f052ee5386f16e.zip |
Merge branch 'master' of https://github.com/AbsInt/CompCert
Diffstat (limited to 'cparser/validator/Tuples.v')
-rw-r--r-- | cparser/validator/Tuples.v | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/cparser/validator/Tuples.v b/cparser/validator/Tuples.v index 88dc46e9..3fd2ec03 100644 --- a/cparser/validator/Tuples.v +++ b/cparser/validator/Tuples.v @@ -26,8 +26,11 @@ Definition arrows_right: Type -> list Type -> Type := fold_right (fun A B => A -> B). (** A tuple is a heterogeneous list. For convenience, we use pairs. **) -Definition tuple (types:list Type) : Type := - fold_right prod unit types. +Fixpoint tuple (types : list Type) : Type := + match types with + | nil => unit + | t::q => prod t (tuple q) + end. Fixpoint uncurry {args:list Type} {res:Type}: arrows_left args res -> tuple args -> res := |