Fix problem with fileModSummary

This commit is contained in:
Nikolay Yakimov
2015-07-03 22:31:52 +03:00
parent 0ad438461b
commit 8f931eb928
4 changed files with 17 additions and 5 deletions

View File

@@ -3,6 +3,7 @@ module Language.Haskell.GhcMod.FileMapping
, loadMappedFiles
, unloadMappedFile
, mapFile
, fileModSummaryWithMapping
) where
import Language.Haskell.GhcMod.Types
@@ -48,3 +49,11 @@ mkMappedTarget tid taoc _ = return $ mkTarget tid taoc Nothing
unloadMappedFile :: IOish m => FilePath -> GhcModT m ()
unloadMappedFile = (delMMappedFile =<<) . getCanonicalFileNameSafe
fileModSummaryWithMapping :: (IOish m, GmState m, GhcMonad m, GmEnv m) =>
FilePath -> m ModSummary
fileModSummaryWithMapping fn = do
mmf <- getCanonicalFileNameSafe fn >>= lookupMMappedFile
case mmf of
Just (RedirectedMapping to) -> fileModSummary to
_ -> fileModSummary fn