Drop loadMappedFiles and move all loading code to progMain

This commit is contained in:
Nikolay Yakimov
2015-08-12 18:01:01 +03:00
parent a9b98e7128
commit c96abfc422
4 changed files with 15 additions and 31 deletions

View File

@@ -1,6 +1,5 @@
module Language.Haskell.GhcMod.FileMapping
( loadMappedFile
, loadMappedFiles
, unloadMappedFile
, mapFile
, fileModSummaryWithMapping
@@ -17,11 +16,6 @@ import Data.Time
import Control.Monad.Trans.Maybe
import GHC
loadMappedFiles :: IOish m => GhcModT m ()
loadMappedFiles = do
Options {fileMappings} <- options
mapM_ (uncurry loadMappedFile) fileMappings
loadMappedFile :: IOish m => FilePath -> FileMapping -> GhcModT m ()
loadMappedFile from fm =
getCanonicalFileNameSafe from >>= (`addMMappedFile` fm)

View File

@@ -113,7 +113,7 @@ errBagToStrList env errs = let
dflags = hsc_dflags env
pu = icPrintUnqual dflags (hsc_IC env)
st = mkUserStyle pu AllTheWay
in runReader (errsToStr (bagToList errs)) GmPprEnv{rsDynFlags=dflags, rsPprStyle=st}
in runReader (errsToStr (bagToList errs)) GmPprEnv{gpeDynFlags=dflags, gpePprStyle=st}
----------------------------------------------------------------