diff --git a/checks/Check.hs b/checks/Check.hs index 76ee62d..7bdf267 100644 --- a/checks/Check.hs +++ b/checks/Check.hs @@ -181,7 +181,7 @@ checkInitVar m graph startNode ,nodesToProcess = lpre graph ,nodesToReAdd = lsuc graph ,defVal = Everything - ,userErrLabel = show + ,userErrLabel = ("for node at: " ++) . show . fmap getNodeMeta . lab graph } getMeta :: Node -> Meta diff --git a/checks/UsageCheckAlgorithms.hs b/checks/UsageCheckAlgorithms.hs index 6699b7b..3fb18e1 100644 --- a/checks/UsageCheckAlgorithms.hs +++ b/checks/UsageCheckAlgorithms.hs @@ -141,7 +141,7 @@ findReachDef graph startNode ,nodesToProcess = lpre graph ,nodesToReAdd = lsuc graph ,defVal = Map.empty - ,userErrLabel = show + ,userErrLabel = ("for node at: " ++) . show . fmap getNodeMeta . lab graph } readInNode' :: Node -> Var -> a -> Bool diff --git a/flow/FlowAlgorithms.hs b/flow/FlowAlgorithms.hs index 3d5a0c6..296c5d4 100644 --- a/flow/FlowAlgorithms.hs +++ b/flow/FlowAlgorithms.hs @@ -129,9 +129,10 @@ flowAlgorithm funcs nodes (startNode, startVal) -- Pick the next node from the list and remove it: = do let (node, workList') = Set.deleteFindMin workList -- Process that node: - total <- foldWithEither (iterateNode vals) (Left $ show workList - ++ userErrLabel - funcs node) (nodesToProcess funcs node) + total <- foldWithEither (iterateNode vals) (Left $ + "Nodes still to process: " ++ show workList + ++ " " ++ userErrLabel funcs node) + (nodesToProcess funcs node) nodeVal <- Map.lookup node vals if total /= nodeVal -- If the value has changed, that will cascade to affect all