aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorLuke Lau <luke_lau@icloud.com>2019-01-20 00:42:00 +0000
committerDaniel Gröber <dxld@darkboxed.org>2019-01-26 02:59:27 +0100
commitf55c951ddaffec1f05e7215017774a80acd6d5e2 (patch)
tree940edaaf114aaaee81484687a06692a9e5c55373 /src
parentec0067142368dbf1ac92f8ba056043d52e41af8b (diff)
Fix getHelperExe not using correct stack programs
In turn fixes errors when building cabal-helper exe for stack projects where the resolver uses a different ghc version than system.
Diffstat (limited to 'src')
-rw-r--r--src/CabalHelper/Compiletime/Program/Stack.hs8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/CabalHelper/Compiletime/Program/Stack.hs b/src/CabalHelper/Compiletime/Program/Stack.hs
index 518e7f9..f0dd766 100644
--- a/src/CabalHelper/Compiletime/Program/Stack.hs
+++ b/src/CabalHelper/Compiletime/Program/Stack.hs
@@ -117,10 +117,6 @@ workdirArg :: QueryEnvI c 'Stack -> [String]
workdirArg QueryEnv{qeDistDir=DistDirStack mworkdir} =
maybeToList $ ("--work-dir="++) . unRelativePath <$> mworkdir
-patchCompPrograms :: StackProjPaths -> CompPrograms -> CompPrograms
-patchCompPrograms StackProjPaths{sppCompExe} cprogs =
- cprogs { ghcProgram = sppCompExe }
-
doStackCmd :: (QueryEnvI c 'Stack -> CallProcessWithCwd a)
-> QueryEnvI c 'Stack -> Maybe FilePath -> [String] -> IO a
doStackCmd procfn qe mcwd args =
@@ -132,3 +128,7 @@ callStackCmd :: QueryEnvI c 'Stack -> Maybe FilePath -> [String] -> IO ()
readStackCmd = doStackCmd (\qe -> qeReadProcess qe "")
callStackCmd = doStackCmd qeCallProcess
+
+patchCompPrograms :: StackProjPaths -> CompPrograms -> CompPrograms
+patchCompPrograms StackProjPaths{sppCompExe} cprogs =
+ cprogs { ghcProgram = sppCompExe }