Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Fixed ghc lib dir lookup via stack for system installed ghc
  • Loading branch information
liskin committed Oct 4, 2016
commit a436699b8587a37eed4561e27a63f7deb3a3e821
6 changes: 5 additions & 1 deletion src/Stack.hs
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,11 @@ getStackGhcBinDir :: FilePath -> IO (Maybe FilePath)
getStackGhcBinDir = fmap (fmap trim) . execStackInPath "path --compiler-bin"

getStackGhcLibDir :: FilePath -> IO (Maybe FilePath)
getStackGhcLibDir = fmap (fmap takeDirectory) . execStackInPath "path --global-pkg-db"
getStackGhcLibDir p = do
ghc <- (trim <$>) <$> execStackInPath "path --compiler-exe" p
case ghc of
Just exe -> (trim <$>) <$> execInPath (exe ++ " --print-libdir") p
Nothing -> return Nothing

getStackDist :: FilePath -> IO (Maybe FilePath)
getStackDist p = (trim <$>) <$> execStackInPath "path --dist-dir" p
Expand Down