aboutsummaryrefslogtreecommitdiff
path: root/src/CabalHelper/Compiletime/Program/CabalInstall.hs
diff options
context:
space:
mode:
authorDaniel Gröber <dxld@darkboxed.org>2019-07-31 17:07:39 +0200
committerDaniel Gröber (dxld) <dxld@darkboxed.org>2019-09-17 17:48:26 +0200
commita93ed8c7d93df1860d2e56b400b724ac47edf470 (patch)
tree85360f0ca82a0e920ffd38b0aaa0318555d9b072 /src/CabalHelper/Compiletime/Program/CabalInstall.hs
parent5ab34761ed8789286cd382273503129cc7a7134f (diff)
Merge CompPrograms back into Programs
We need to support passing down the path to ghc to new-build/stack in order to support using a non-default 'ghc' executable.
Diffstat (limited to 'src/CabalHelper/Compiletime/Program/CabalInstall.hs')
-rw-r--r--src/CabalHelper/Compiletime/Program/CabalInstall.hs14
1 files changed, 7 insertions, 7 deletions
diff --git a/src/CabalHelper/Compiletime/Program/CabalInstall.hs b/src/CabalHelper/Compiletime/Program/CabalInstall.hs
index 4411bc3..2af1cdc 100644
--- a/src/CabalHelper/Compiletime/Program/CabalInstall.hs
+++ b/src/CabalHelper/Compiletime/Program/CabalInstall.hs
@@ -180,7 +180,7 @@ compileSetupHs (GhcVersion ghcVer) db srcdir = do
file = srcdir </> "Setup"
- callProcessStderr (Just srcdir) (ghcProgram ?cprogs) $ concat
+ callProcessStderr (Just srcdir) (ghcProgram ?progs) $ concat
[ [ "--make"
, "-package-conf", db
]
@@ -193,11 +193,11 @@ compileSetupHs (GhcVersion ghcVer) db srcdir = do
cabalWithGHCProgOpts :: Progs => [String]
cabalWithGHCProgOpts = concat
- [ [ "--with-ghc=" ++ ghcProgram ?cprogs ]
+ [ [ "--with-ghc=" ++ ghcProgram ?progs ]
-- Only pass ghc-pkg if it was actually set otherwise we
-- might break cabal's guessing logic
- , if ghcPkgProgram ?cprogs /= ghcPkgProgram defaultCompPrograms
- then [ "--with-ghc-pkg=" ++ ghcPkgProgram ?cprogs ]
+ , if ghcPkgProgram ?progs /= ghcPkgProgram defaultPrograms
+ then [ "--with-ghc-pkg=" ++ ghcPkgProgram ?progs ]
else []
]
@@ -238,9 +238,9 @@ installCabalLibV2 _ghcVer cv (PackageEnvFile env_file) = do
cabalV2WithGHCProgOpts :: Progs => [String]
cabalV2WithGHCProgOpts = concat
- [ [ "--with-compiler=" ++ ghcProgram ?cprogs ]
- , if ghcPkgProgram ?cprogs /= ghcPkgProgram defaultCompPrograms
- then [ "--with-hc-pkg=" ++ ghcPkgProgram ?cprogs ]
+ [ [ "--with-compiler=" ++ ghcProgram ?progs ]
+ , if ghcPkgProgram ?progs /= ghcPkgProgram defaultPrograms
+ then [ "--with-hc-pkg=" ++ ghcPkgProgram ?progs ]
else []
]