From a355c72bd6be5fdbfeb3be843818922939d2f94a Mon Sep 17 00:00:00 2001 From: Daniel Gröber Date: Sun, 14 Oct 2018 01:37:46 +0200 Subject: Add 'allUnits' convenience query --- tests/GhcSession.hs | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) (limited to 'tests') diff --git a/tests/GhcSession.hs b/tests/GhcSession.hs index 88d5ebf..ca01abd 100644 --- a/tests/GhcSession.hs +++ b/tests/GhcSession.hs @@ -92,14 +92,10 @@ run x xs = do ExitSuccess <- rawSystem x xs return () -allComponents :: Query pt [ChComponentInfo] -allComponents = - concat . map (Map.elems . uiComponents) <$> (mapM unitQuery =<< projectUnits) - test :: FilePath -> IO [Bool] test dir = do qe <- mkQueryEnv (ProjDirV1 dir) (DistDirV1 $ dir "dist") - cs <- runQuery allComponents qe + cs <- runQuery (concat <$> allUnits (Map.elems . uiComponents)) qe forM cs $ \ChComponentInfo{..} -> do putStrLn $ "\n" ++ show ciComponentName ++ ":::: " ++ show ciNeedsBuildOutput -- cgit v1.2.3