diff options
author | Bernhard Schommer <bernhardschommer@gmail.com> | 2015-07-14 22:41:24 +0200 |
---|---|---|
committer | Bernhard Schommer <bernhardschommer@gmail.com> | 2015-07-14 22:41:24 +0200 |
commit | 4c146156a36d48209a6206f61f80dc5d4c48ce93 (patch) | |
tree | dc8e3b1c7daf41cdf965c9e3e6119dcb5d6a41e5 /cparser/validator | |
parent | d03d47c6e4ce9324d6d59ae36cb8db78b013be54 (diff) | |
parent | f995a671ceb28c2a83e5e5574c3cdb46fd5e0f57 (diff) | |
download | compcert-4c146156a36d48209a6206f61f80dc5d4c48ce93.tar.gz compcert-4c146156a36d48209a6206f61f80dc5d4c48ce93.zip |
Merge branch 'master' into asmexpand
Diffstat (limited to 'cparser/validator')
-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 := |