From e2f5d18169c91a6960a2e8bd2505434c0d0855c5 Mon Sep 17 00:00:00 2001 From: Neil Brown Date: Wed, 19 Mar 2008 17:15:14 +0000 Subject: [PATCH] Added a case in pullRepCountSeq for ForEach replicators --- transformations/SimplifyExprs.hs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/transformations/SimplifyExprs.hs b/transformations/SimplifyExprs.hs index 72ab724..df22a70 100644 --- a/transformations/SimplifyExprs.hs +++ b/transformations/SimplifyExprs.hs @@ -182,7 +182,10 @@ pullRepCounts = doGeneric `extM` doProcess spec@(A.Specification _ nonceName _) <- makeNonceIsExpr "rep_for" m' t for s' <- pullRepCountSeq s return $ A.Spec m spec $ A.Rep m (A.For m' n from (A.ExprVariable m' $ A.Variable m' nonceName)) s' - + -- Other replicators (such as ForEach) + pullRepCountSeq (A.Rep m rep s) + = do s' <- pullRepCountSeq s + return $ A.Rep m rep s' transformConstr :: Data t => t -> PassM t transformConstr = doGeneric `ext1M` doStructured