From 8ee32f0795e1ffa45059599ba465c6016ef9af29 Mon Sep 17 00:00:00 2001 From: Neil Brown Date: Tue, 31 Mar 2009 16:51:02 +0000 Subject: [PATCH] Made sure that record literals are pulled up (perhaps this accidentally lost in the past?) --- transformations/SimplifyExprs.hs | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/transformations/SimplifyExprs.hs b/transformations/SimplifyExprs.hs index 00dc1bc..338daff 100644 --- a/transformations/SimplifyExprs.hs +++ b/transformations/SimplifyExprs.hs @@ -443,6 +443,10 @@ pullUp pullUpArraysInsideRecords = pass "Pull up definitions" case e' of A.Literal {} -> pull t e' _ -> return e' + A.Record _ -> + case e' of + A.Literal {} -> pull t e' + _ -> return e' _ -> return e' where pull :: A.Type -> A.Expression -> PassM A.Expression