diff --git a/Language/Haskell/GhcMod/Find.hs b/Language/Haskell/GhcMod/Find.hs index b923917..37d10c6 100644 --- a/Language/Haskell/GhcMod/Find.hs +++ b/Language/Haskell/GhcMod/Find.hs @@ -59,8 +59,13 @@ newtype SymbolDb = SymbolDb (Map Symbol [ModuleString]) ---------------------------------------------------------------- +-- | When introducing incompatible changes to the 'symbolCache' file format +-- increment this version number. +symbolCacheVersion = 0 + +-- | Filename of the symbol table cache file. symbolCache :: String -symbolCache = "ghc-mod.cache" +symbolCache = "ghc-mod-"++ show symbolCacheVersion ++".cache" packageCache :: String packageCache = "package.cache" @@ -130,7 +135,6 @@ getSymbolCachePath = do -- if the file does not exist or is invalid. -- The file name is printed. --- TODO: Before releaseing add a version number to the name of the cache file dumpSymbol :: IOish m => GhcModT m String dumpSymbol = do dir <- getSymbolCachePath