diff options
author | Jacques-Henri Jourdan <jacques-henri.jourdan@inria.fr> | 2015-07-07 18:07:31 +0200 |
---|---|---|
committer | Jacques-Henri Jourdan <jacques-henri.jourdan@inria.fr> | 2015-07-07 18:07:31 +0200 |
commit | 4717443c519f5d6426c165de545952b2b7ef50f9 (patch) | |
tree | ee6189d91f7f06fe33bae2a8cd0c55007f2eb9c8 | |
parent | 4148ee08387bf953bdbe69f7668597ec0bcccc29 (diff) | |
download | compcert-4717443c519f5d6426c165de545952b2b7ef50f9.tar.gz compcert-4717443c519f5d6426c165de545952b2b7ef50f9.zip |
Change the definition of Typles.tuple
-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 := |