diff options
author | Luke Lau <luke_lau@icloud.com> | 2019-11-17 01:36:18 +0000 |
---|---|---|
committer | Daniel Gröber <dxld@darkboxed.org> | 2019-12-21 04:39:11 +0100 |
commit | 5b6cefdbe03ebc4ec6451751fbaba72cab663766 (patch) | |
tree | e7e5d11f799e066752d9a00f08325fa48aea80de | |
parent | 94c7695f4d25ecae8df655326351bf6014e02a9e (diff) |
Always include cabal-v2 project in discover
-rw-r--r-- | lib/Distribution/Helper/Discover.hs | 4 |
1 files changed, 2 insertions, 2 deletions
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. |