From 3c101bae1905651900c0f8993266f86cda5b5326 Mon Sep 17 00:00:00 2001 From: Neil Brown Date: Sun, 14 Oct 2007 00:14:19 +0000 Subject: [PATCH] Removed my old cgmap function, in favour of the identical library function mapM_ --- backends/GenerateCPPCSP.hs | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/backends/GenerateCPPCSP.hs b/backends/GenerateCPPCSP.hs index 63bccd3..395c3a6 100644 --- a/backends/GenerateCPPCSP.hs +++ b/backends/GenerateCPPCSP.hs @@ -599,11 +599,6 @@ cppremoveSpec _ _ = return () cppgenArrayStoreName :: GenOps -> A.Name -> CGen() cppgenArrayStoreName ops n = genName n >> tell ["_actual"] --- FIXME: This could be used elsewhere (and work in any monad) --- | A helper function that maps a function and calls sequence on the resulting [CGen()] -cgmap :: (t -> CGen()) -> [t] -> CGen() -cgmap func list = sequence_ $ map func list - --Changed from GenerateC because we don't need the extra code for array sizes cppabbrevExpression :: GenOps -> A.AbbrevMode -> A.Type -> A.Expression -> CGen () cppabbrevExpression ops am t@(A.Array _ _) e @@ -668,7 +663,7 @@ cppgenForwardDeclaration ops (A.Specification _ n (A.Proc _ sm fs _)) --Generates the given list of class variables genClassVars :: [A.Formal] -> CGen () - genClassVars fs = cgmap genClassVar fs + genClassVars fs = mapM_ genClassVar fs --A helper function for generating the initialiser list in a process wrapper constructor genConsItem :: A.Formal -> CGen() @@ -681,7 +676,7 @@ cppgenForwardDeclaration ops (A.Specification _ n (A.Proc _ sm fs _)) --A function for generating the initialiser list in a process wrapper constructor genConstructorList :: [A.Formal] -> CGen () - genConstructorList fs = cgmap genConsItem fs + genConstructorList fs = mapM_ genConsItem fs cppgenForwardDeclaration _ _ = return ()