aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorXavier Leroy <xavierleroy@users.noreply.github.com>2015-07-07 18:37:30 +0200
committerXavier Leroy <xavierleroy@users.noreply.github.com>2015-07-07 18:37:30 +0200
commit3ad38a3dfdd9714feca358b02a42e8d8b55c7c77 (patch)
treeee6189d91f7f06fe33bae2a8cd0c55007f2eb9c8
parent4148ee08387bf953bdbe69f7668597ec0bcccc29 (diff)
parent4717443c519f5d6426c165de545952b2b7ef50f9 (diff)
downloadcompcert-3ad38a3dfdd9714feca358b02a42e8d8b55c7c77.tar.gz
compcert-3ad38a3dfdd9714feca358b02a42e8d8b55c7c77.zip
Merge pull request #49 from jhjourdan/ch2o_universes_compat
Change the definition of Typles.tuple to an equivalent definition that works better w.r.t. universe constraints.
-rw-r--r--cparser/validator/Tuples.v7
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 :=