From a1daf155766ee3dee89f47a8a917fb4503fc37b5 Mon Sep 17 00:00:00 2001 From: Neil Brown Date: Fri, 21 Mar 2008 19:21:46 +0000 Subject: [PATCH] Pulled up list expressions in a similar way to array expressions --- transformations/SimplifyExprs.hs | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/transformations/SimplifyExprs.hs b/transformations/SimplifyExprs.hs index 4d25afc..c9b16db 100644 --- a/transformations/SimplifyExprs.hs +++ b/transformations/SimplifyExprs.hs @@ -324,6 +324,10 @@ pullUp pullUpArraysInsideRecords A.ExprVariable _ (A.DirectedVariable _ _ _) -> return e' --TODO work out whether to pull up DerefVariable _ -> pull t e' + A.List _ -> + case e' of + A.ExprVariable _ _ -> return e' + _ -> pull t e' _ -> return e' where pull :: A.Type -> A.Expression -> PassM A.Expression