Wrap dumpsym in stderr mangling readProc as well just in case

This commit is contained in:
Daniel Gröber 2015-08-14 03:51:50 +02:00
parent cbfa26eb16
commit 0b5de23ac9
1 changed files with 3 additions and 1 deletions

View File

@ -26,6 +26,7 @@ import Language.Haskell.GhcMod.PathsAndFiles
import Language.Haskell.GhcMod.Types
import Language.Haskell.GhcMod.Utils
import Language.Haskell.GhcMod.World (timedPackageCaches)
import Language.Haskell.GhcMod.Output
import Name (getOccString)
import Module (moduleName)
import System.Directory (doesFileExist, getModificationTime)
@ -72,7 +73,8 @@ loadSymbolDb :: IOish m => GhcModT m SymbolDb
loadSymbolDb = do
ghcMod <- liftIO ghcModExecutable
tmpdir <- cradleTempDir <$> cradle
file <- liftIO $ chop <$> readProcess ghcMod ["dumpsym", tmpdir] ""
readProc <- gmReadProcess
file <- liftIO $ chop <$> readProc ghcMod ["dumpsym", tmpdir] ""
!db <- M.fromAscList . map conv . lines <$> liftIO (readFile file)
return $ SymbolDb
{ table = db