aboutsummaryrefslogtreecommitdiff
path: root/src/CabalHelper/Compiletime
diff options
context:
space:
mode:
authorDaniel Gröber <dxld@darkboxed.org>2019-07-30 02:16:19 +0200
committerDaniel Gröber (dxld) <dxld@darkboxed.org>2019-09-17 17:48:26 +0200
commit8c9361e4ba6e2257f2bd9d354a56005318477ed6 (patch)
treedc62b3396268a11550669aa7f43933ca4e4899b7 /src/CabalHelper/Compiletime
parent1b05d896884a8c02306f73f82658e7c6f3825fff (diff)
Support cabal-file not being in pkgdir with cabal-v1
Diffstat (limited to 'src/CabalHelper/Compiletime')
-rw-r--r--src/CabalHelper/Compiletime/Types.hs6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/CabalHelper/Compiletime/Types.hs b/src/CabalHelper/Compiletime/Types.hs
index ec24f2d..f9900bb 100644
--- a/src/CabalHelper/Compiletime/Types.hs
+++ b/src/CabalHelper/Compiletime/Types.hs
@@ -66,7 +66,7 @@ data ProjLoc (pt :: ProjType) where
-- ending in @.cabal@ existing in the directory. More than one such files
-- existing is a user error. Note: For this project type the concepts of
-- project and package coincide.
- ProjLocV1CabalFile :: { plCabalFile :: !FilePath } -> ProjLoc 'V1
+ ProjLocV1CabalFile :: { plCabalFile :: !FilePath, plPackageDir :: !FilePath } -> ProjLoc 'V1
-- | A @cabal v1-build@ project directory. Same as 'ProjLocV1CabalFile' but
-- will search for the cabal file for you. If more than one @.cabal@ file
@@ -86,8 +86,8 @@ data ProjLoc (pt :: ProjType) where
deriving instance Show (ProjLoc pt)
plV1Dir :: ProjLoc 'V1 -> FilePath
-plV1Dir (ProjLocV1CabalFile cabal_file) = takeDirectory cabal_file
-plV1Dir (ProjLocV1Dir pkgdir) = pkgdir
+plV1Dir ProjLocV1CabalFile {plPackageDir} = plPackageDir
+plV1Dir ProjLocV1Dir {plPackageDir} = plPackageDir
data DistDir (pt :: ProjType) where
-- | Build directory for cabal /old-build/ aka. /v1-build/ aka. just