diff --git a/checks/Check.hs b/checks/Check.hs index dcd36eb..76ee62d 100644 --- a/checks/Check.hs +++ b/checks/Check.hs @@ -45,7 +45,7 @@ import UsageCheckUtils import Utils usageCheckPass :: A.AST -> PassM A.AST -usageCheckPass t = do g' <- buildFlowGraph labelFunctions t +usageCheckPass t = do g' <- buildFlowGraph labelUsageFunctions t (g, roots) <- case g' of Left err -> dieP (findMeta t) err Right (g,rs,_) -> return (g,rs) diff --git a/checks/UsageCheckUtils.hs b/checks/UsageCheckUtils.hs index 25a83f9..bb2484c 100644 --- a/checks/UsageCheckUtils.hs +++ b/checks/UsageCheckUtils.hs @@ -16,7 +16,7 @@ You should have received a copy of the GNU General Public License along with this program. If not, see . -} -module UsageCheckUtils (Decl(..), emptyVars, flattenParItems, foldUnionVars, getVarProcCall, getVarProc, labelFunctions, mapUnionVars, ParItems(..), processVarW, transformParItems, UsageLabel(..), Var(..), Vars(..), vars) where +module UsageCheckUtils (Decl(..), emptyVars, flattenParItems, foldUnionVars, getVarProcCall, getVarProc, labelUsageFunctions, mapUnionVars, ParItems(..), processVarW, transformParItems, UsageLabel(..), Var(..), Vars(..), vars) where import Control.Monad.Writer (tell) import Data.Generics hiding (GT) @@ -217,8 +217,8 @@ getVarRepExp (A.ForEach _ e) = getVarExp e getVarAlternative :: A.Alternative -> Vars getVarAlternative = const emptyVars -- TODO -labelFunctions :: forall m. (Die m, CSMR m) => GraphLabelFuncs m UsageLabel -labelFunctions = GLF +labelUsageFunctions :: forall m. (Die m, CSMR m) => GraphLabelFuncs m UsageLabel +labelUsageFunctions = GLF { labelExpression = single getVarExp ,labelExpressionList = single getVarExpList diff --git a/transformations/ImplicitMobility.hs b/transformations/ImplicitMobility.hs index 609a9c4..94eb60a 100644 --- a/transformations/ImplicitMobility.hs +++ b/transformations/ImplicitMobility.hs @@ -160,7 +160,7 @@ implicitMobility = rainOnlyPass "Implicit mobility optimisation" [] [] --TODO properties (passOnlyOnAST "implicitMobility" $ \t -> do - g' <- buildFlowGraph labelFunctions t + g' <- buildFlowGraph labelUsageFunctions t :: PassM (Either String (FlowGraph' PassM UsageLabel (), [Node], [Node])) case g' of