Drop loadMappedFiles and move all loading code to progMain
This commit is contained in:
@@ -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)
|
||||
|
||||
@@ -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}
|
||||
|
||||
----------------------------------------------------------------
|
||||
|
||||
|
||||
Reference in New Issue
Block a user