diff options
author | Daniel Gröber <dxld@darkboxed.org> | 2019-08-21 03:43:37 +0200 |
---|---|---|
committer | Daniel Gröber (dxld) <dxld@darkboxed.org> | 2019-09-17 17:48:26 +0200 |
commit | b67c9dda1b898f3ddfb6ddd710c886bef9085c94 (patch) | |
tree | a6562c24a3fc928d0a14e73542077637e22e0f5c /src/CabalHelper/Compiletime/Program | |
parent | 39290777e40636700a6a2d7906bacb506d8600b1 (diff) |
Use plStackProjectDir instead of 'takeDirectory stack_yaml'
Diffstat (limited to 'src/CabalHelper/Compiletime/Program')
-rw-r--r-- | src/CabalHelper/Compiletime/Program/Stack.hs | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/CabalHelper/Compiletime/Program/Stack.hs b/src/CabalHelper/Compiletime/Program/Stack.hs index 0f9e46d..075f46c 100644 --- a/src/CabalHelper/Compiletime/Program/Stack.hs +++ b/src/CabalHelper/Compiletime/Program/Stack.hs @@ -74,8 +74,8 @@ getPackage qe cabal_file@(CabalFile cabal_file_path) = do return pkg projPaths :: QueryEnvI c 'Stack -> IO StackProjPaths -projPaths qe@QueryEnv {qeProjLoc=ProjLocStackYaml stack_yaml} = do - look <- paths qe $ takeDirectory stack_yaml +projPaths qe@QueryEnv {qeProjLoc} = do + look <- paths qe $ plStackProjectDir qeProjLoc return StackProjPaths { sppGlobalPkgDb = PackageDbDir $ look "global-pkg-db:" , sppSnapPkgDb = PackageDbDir $ look "snapshot-pkg-db:" @@ -93,9 +93,9 @@ paths qe@QueryEnv{qeProjLoc=ProjLocStackYaml stack_yaml} cwd split l = let (key, ' ' : val) = span (not . isSpace) l in (key, val) listPackageCabalFiles :: QueryEnvI c 'Stack -> IO [CabalFile] -listPackageCabalFiles qe@QueryEnv{qeProjLoc=ProjLocStackYaml stack_yaml} +listPackageCabalFiles qe@QueryEnv{qeProjLoc} = handle ioerror $ do - let projdir = takeDirectory stack_yaml + let projdir = plStackProjectDir qeProjLoc out <- readStackCmd qe (Just projdir) [ "ide", "packages", "--cabal-files", "--stdout" ] return $ map CabalFile $ lines out |