From 783eadafe6e6333123add96d2fc0276c8b4cc1d9 Mon Sep 17 00:00:00 2001 From: Daniel Gröber Date: Mon, 22 Oct 2018 01:20:56 +0200 Subject: Suport using Stack's built-in GHC to build the helper --- src/CabalHelper/Compiletime/Program/Stack.hs | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'src/CabalHelper/Compiletime/Program') diff --git a/src/CabalHelper/Compiletime/Program/Stack.hs b/src/CabalHelper/Compiletime/Program/Stack.hs index e7f280d..322ccaf 100644 --- a/src/CabalHelper/Compiletime/Program/Stack.hs +++ b/src/CabalHelper/Compiletime/Program/Stack.hs @@ -20,7 +20,7 @@ Description : Stack program interface License : GPL-3 -} -{-# LANGUAGE GADTs, DataKinds #-} +{-# LANGUAGE NamedFieldPuns, GADTs, DataKinds #-} module CabalHelper.Compiletime.Program.Stack where @@ -64,6 +64,7 @@ projPaths qe@QueryEnv {qeProjLoc=ProjLocStackDir projdir} = do { sppGlobalPkgDb = PackageDbDir $ look "global-pkg-db:" , sppSnapPkgDb = PackageDbDir $ look "snapshot-pkg-db:" , sppLocalPkgDb = PackageDbDir $ look "local-pkg-db:" + , sppCompExe = look "compiler-exe:" } paths :: QueryEnvI c 'Stack @@ -85,3 +86,7 @@ listPackageCabalFiles qe@QueryEnv{qeProjLoc=ProjLocStackDir projdir} = do 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 } -- cgit v1.2.3