Renamed labelFunctions to labelUsageFunctions, to make it clearer what the functions are for
This commit is contained in:
parent
ac3d1ed42a
commit
936382a3ca
|
@ -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)
|
||||
|
|
|
@ -16,7 +16,7 @@ You should have received a copy of the GNU General Public License along
|
|||
with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
-}
|
||||
|
||||
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
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue
Block a user