aboutsummaryrefslogtreecommitdiff
path: root/tests/GhcSession.hs
diff options
context:
space:
mode:
authorDaniel Gröber <dxld@darkboxed.org>2019-07-30 16:08:18 +0200
committerDaniel Gröber (dxld) <dxld@darkboxed.org>2019-09-17 17:48:26 +0200
commitf29e10402d7cba68264f06d8644712e189e17142 (patch)
tree667c494131cf5fa1dd04fa664cb8a2b6d6d767ee /tests/GhcSession.hs
parent8c9361e4ba6e2257f2bd9d354a56005318477ed6 (diff)
Split SProjType along build-tool line
This makes it much easier to deal with differences between the build tools as we can now have functions that only make sense for Cabal and statically enforce this by passing a 'SCabalProjType pt' as evidence that $pt \in {V1, V2}$.
Diffstat (limited to 'tests/GhcSession.hs')
-rw-r--r--tests/GhcSession.hs8
1 files changed, 4 insertions, 4 deletions
diff --git a/tests/GhcSession.hs b/tests/GhcSession.hs
index 871fddd..22b94b4 100644
--- a/tests/GhcSession.hs
+++ b/tests/GhcSession.hs
@@ -419,8 +419,8 @@ data ProjSetupImpl pt =
oldBuildProjSetup :: ProjSetup0
oldBuildProjSetup = ProjSetupDescr "cabal-v1" $ Right $ Ex $ ProjSetupImpl
- { psiProjType = SV1
- , psiDistDir = \dir -> DistDirV1 (dir </> "dist")
+ { psiProjType = SCabal SCV1
+ , psiDistDir = \dir -> DistDirCabal SCV1 (dir </> "dist")
, psiProjLoc = \(CabalFile cf) projdir -> ProjLocV1CabalFile cf projdir
, psiConfigure = \progs dir ->
runWithCwd dir (cabalProgram progs) [ "configure" ]
@@ -433,8 +433,8 @@ oldBuildProjSetup = ProjSetupDescr "cabal-v1" $ Right $ Ex $ ProjSetupImpl
newBuildProjSetup :: ProjSetup0
newBuildProjSetup = ProjSetupDescr "cabal-v2" $ Right $ Ex $ ProjSetupImpl
- { psiProjType = SV2
- , psiDistDir = \dir -> DistDirV2 (dir </> "dist-newstyle")
+ { psiProjType = SCabal SCV2
+ , psiDistDir = \dir -> DistDirCabal SCV2 (dir </> "dist-newstyle")
, psiProjLoc = \_cabal_file projdir -> ProjLocV2File $ projdir </> "cabal.project"
-- TODO: check if cabal.project is there and only use
-- V2File then, also remove addCabalProject below so we