aboutsummaryrefslogtreecommitdiff
path: root/lib/Distribution
diff options
context:
space:
mode:
Diffstat (limited to 'lib/Distribution')
-rw-r--r--lib/Distribution/Helper.hs6
-rw-r--r--lib/Distribution/Helper/Discover.hs4
2 files changed, 5 insertions, 5 deletions
diff --git a/lib/Distribution/Helper.hs b/lib/Distribution/Helper.hs
index 1505063..d9c9285 100644
--- a/lib/Distribution/Helper.hs
+++ b/lib/Distribution/Helper.hs
@@ -213,7 +213,7 @@ mkQueryEnv projloc distdir = do
projConf :: ProjLoc pt -> IO (ProjConf pt)
projConf (ProjLocV1Dir pkgdir) =
ProjConfV1 <$> findCabalFile pkgdir
-projConf (ProjLocV1CabalFile cabal_file) = return $
+projConf (ProjLocV1CabalFile cabal_file _) = return $
ProjConfV1 cabal_file
projConf (ProjLocV2Dir projdir_path) =
projConf $ ProjLocV2File $ projdir_path </> "cabal.project"
@@ -435,7 +435,7 @@ readProjInfo qe pc pcm = withVerbosity $ do
let projloc = qeProjLoc qe
case (qeDistDir qe, pc) of
(DistDirV1 distdir, ProjConfV1{pcV1CabalFile}) -> do
- let projdir = plV1Dir projloc
+ let pkgdir = plV1Dir projloc
setup_config_path <- canonicalizePath (distdir </> "setup-config")
mhdr <- readSetupConfigHeader setup_config_path
case mhdr of
@@ -445,7 +445,7 @@ readProjInfo qe pc pcm = withVerbosity $ do
, piProjConfModTimes = pcm
, piUnits = (:|[]) $ Unit
{ uUnitId = UnitId ""
- , uPackageDir = projdir
+ , uPackageDir = pkgdir
, uCabalFile = CabalFile pcV1CabalFile
, uDistDir = DistDirLib distdir
, uImpl = UnitImplV1
diff --git a/lib/Distribution/Helper/Discover.hs b/lib/Distribution/Helper/Discover.hs
index a748b25..635474d 100644
--- a/lib/Distribution/Helper/Discover.hs
+++ b/lib/Distribution/Helper/Discover.hs
@@ -52,10 +52,10 @@ findProjects dir = execWriterT $ do
let stackYaml = dir </> "stack.yaml"
whenM (liftIO $ doesFileExist stackYaml) $
tell [Ex $ ProjLocStackYaml stackYaml]
- join $ traverse (tell . pure . Ex . ProjLocV1CabalFile) <$>
+ join $ traverse (tell . pure . Ex . ProjLocV1Dir . takeDirectory) <$>
liftIO (findCabalFiles dir)
-findDistDirs (ProjLocV1CabalFile cabal) =
+findDistDirs (ProjLocV1CabalFile cabal _) =
[DistDirV1 $ replaceFileName cabal "dist/"]
findDistDirs (ProjLocV1Dir dir) = [DistDirV1 $ dir </> "dist/"]
findDistDirs (ProjLocV2File cabal) =