We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents a38ac7b + a436699 commit 69bbc21Copy full SHA for 69bbc21
1 file changed
src/Stack.hs
@@ -52,7 +52,11 @@ getStackGhcBinDir :: FilePath -> IO (Maybe FilePath)
52
getStackGhcBinDir = fmap (fmap trim) . execStackInPath "path --compiler-bin"
53
54
getStackGhcLibDir :: FilePath -> IO (Maybe FilePath)
55
-getStackGhcLibDir = fmap (fmap takeDirectory) . execStackInPath "path --global-pkg-db"
+getStackGhcLibDir p = do
56
+ ghc <- (trim <$>) <$> execStackInPath "path --compiler-exe" p
57
+ case ghc of
58
+ Just exe -> (trim <$>) <$> execInPath (exe ++ " --print-libdir") p
59
+ Nothing -> return Nothing
60
61
getStackDist :: FilePath -> IO (Maybe FilePath)
62
getStackDist p = (trim <$>) <$> execStackInPath "path --dist-dir" p
0 commit comments