From 96e233b64c8fd962f27e3bfb3dd8f12f15ef4f67 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=A9dric=20Pasteur?= Date: Fri, 14 Sep 2012 15:42:49 +0200 Subject: [PATCH] Fix for tuples of consts used as args --- compiler/heptagon/transformations/normalize.ml | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/compiler/heptagon/transformations/normalize.ml b/compiler/heptagon/transformations/normalize.ml index f182a83..6804096 100644 --- a/compiler/heptagon/transformations/normalize.ml +++ b/compiler/heptagon/transformations/normalize.ml @@ -73,9 +73,11 @@ let e_to_e_list e = match e.e_desc with | _ -> assert false let flatten_e_list l = - let flatten = function - | { e_desc = Eapp({ a_op = Etuple }, l, _) } -> l - | e -> [e] + let flatten e = + if is_list e then + e_to_e_list e + else + [e] in List.flatten (List.map flatten l)