From 5b6cefdbe03ebc4ec6451751fbaba72cab663766 Mon Sep 17 00:00:00 2001 From: Luke Lau Date: Sun, 17 Nov 2019 01:36:18 +0000 Subject: Always include cabal-v2 project in discover --- lib/Distribution/Helper/Discover.hs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'lib/Distribution/Helper/Discover.hs') diff --git a/lib/Distribution/Helper/Discover.hs b/lib/Distribution/Helper/Discover.hs index a1a6c05..cddb40f 100644 --- a/lib/Distribution/Helper/Discover.hs +++ b/lib/Distribution/Helper/Discover.hs @@ -54,8 +54,8 @@ findProjects dir = execWriterT $ do let stackYaml = dir "stack.yaml" whenM (liftIO $ doesFileExist stackYaml) $ tell [Ex $ ProjLocStackYaml stackYaml] - join $ traverse (tell . pure . Ex . ProjLocV1Dir . takeDirectory) <$> - liftIO (findCabalFile dir) + maybeCabalDir <- liftIO (fmap takeDirectory <$> findCabalFile dir) + forM_ [Ex . ProjLocV2Dir, Ex . ProjLocV1Dir] $ \proj -> traverse (tell . pure . proj) maybeCabalDir -- | @getDefaultDistDir pl@. Get the default dist-dir for the given project. -- cgit v1.2.3