From f55c951ddaffec1f05e7215017774a80acd6d5e2 Mon Sep 17 00:00:00 2001 From: Luke Lau Date: Sun, 20 Jan 2019 00:42:00 +0000 Subject: 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. --- src/CabalHelper/Compiletime/Program/Stack.hs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'src/CabalHelper/Compiletime') 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 } -- cgit v1.2.3