aboutsummaryrefslogtreecommitdiff
path: root/tests/GhcSession.hs
diff options
context:
space:
mode:
authorDaniel Gröber <dxld@darkboxed.org>2018-10-14 01:37:46 +0200
committerDaniel Gröber <dxld@darkboxed.org>2018-10-27 19:53:16 +0200
commita355c72bd6be5fdbfeb3be843818922939d2f94a (patch)
tree2dd7af9e7df1c8e7262120fda7b052706c1a267c /tests/GhcSession.hs
parent8e5685ce57b296b7ba949173851a7f80c88e0ce2 (diff)
Add 'allUnits' convenience query
Diffstat (limited to 'tests/GhcSession.hs')
-rw-r--r--tests/GhcSession.hs6
1 files changed, 1 insertions, 5 deletions
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