Commented out the debugging output in the check framework and tests

This commit is contained in:
Neil Brown 2008-11-19 16:04:25 +00:00
parent d81810e506
commit 3b166490f1
2 changed files with 5 additions and 5 deletions

View File

@ -280,12 +280,12 @@ checkUnusedVar = forAnyASTStruct doSpec
where where
doSpec :: Data a => A.Structured a -> CheckOptM' (A.Structured a) () doSpec :: Data a => A.Structured a -> CheckOptM' (A.Structured a) ()
doSpec (A.Spec _ (A.Specification mspec name _) scope) doSpec (A.Spec _ (A.Specification mspec name _) scope)
= do liftIO $ putStrLn $ "Found spec at: " ++ show mspec = do -- liftIO $ putStrLn $ "Found spec at: " ++ show mspec
mvars <- withChild [1] $ getCachedAnalysis' isScopeIn varsTouchedAfter mvars <- withChild [1] $ getCachedAnalysis' isScopeIn varsTouchedAfter
-- liftIO $ putStrLn $ "Vars: " ++ show vars -- liftIO $ putStrLn $ "Vars: " ++ show vars
when (isNothing mvars) $ liftIO $ putStrLn $ "No analysis for: " ++ show mspec -- when (isNothing mvars) $ liftIO $ putStrLn $ "No analysis for: " ++ show mspec
doMaybe $ flip fmap mvars $ \vars -> do doMaybe $ flip fmap mvars $ \vars -> do
liftIO $ putStrLn $ "Analysing: " ++ show mspec -- liftIO $ putStrLn $ "Analysing: " ++ show mspec
when (not $ (Var $ A.Variable emptyMeta name) `Set.member` vars) $ when (not $ (Var $ A.Variable emptyMeta name) `Set.member` vars) $
do -- TODO have a more general way of not warning about compiler-generated names: do -- TODO have a more general way of not warning about compiler-generated names:
when (not $ "_sizes" `isSuffixOf` A.nameName name) $ when (not $ "_sizes" `isSuffixOf` A.nameName name) $

View File

@ -410,8 +410,8 @@ getCachedAnalysis' f an = do
r <- askRoute r <- askRoute
-- Find the node that matches our location and the given function: -- Find the node that matches our location and the given function:
case find (\(_,l) -> f (getNodeData l) && (getNodeRouteId l == routeId r)) (labNodes g) of case find (\(_,l) -> f (getNodeData l) && (getNodeRouteId l == routeId r)) (labNodes g) of
Nothing -> (liftIO $ putStrLn $ "Could not find node for: " ++ show (lastValidMeta Nothing -> {- (liftIO $ putStrLn $ "Could not find node for: " ++ show (lastValidMeta
d)) >> return Nothing d)) >> -} return Nothing
Just (n, _) -> Just (n, _) ->
case Map.lookup n (getFlowGraphAnalysis an d) of case Map.lookup n (getFlowGraphAnalysis an d) of
Just y -> return (Just y) Just y -> return (Just y)