diff --git a/Language/Haskell/GhcMod/Find.hs b/Language/Haskell/GhcMod/Find.hs index a848c3e..09c1c4f 100644 --- a/Language/Haskell/GhcMod/Find.hs +++ b/Language/Haskell/GhcMod/Find.hs @@ -61,17 +61,6 @@ isOutdated db = symbolDbCachePath db `isOlderThan` packageCachePath db ---------------------------------------------------------------- --- | When introducing incompatible changes to the 'symbolCache' file format --- increment this version number. -symbolCacheVersion :: Integer -symbolCacheVersion = 0 - --- | Filename of the symbol table cache file. -symbolCache :: String -symbolCache = "ghc-mod-"++ show symbolCacheVersion ++".cache" - ----------------------------------------------------------------- - -- | Looking up 'SymbolDb' with 'Symbol' to \['ModuleString'\] -- which will be concatenated. 'loadSymbolDb' is called internally. findSymbol :: IOish m => Symbol -> GhcModT m String @@ -114,7 +103,7 @@ loadSymbolDb = do dumpSymbol :: IOish m => FilePath -> GhcModT m String dumpSymbol dir = do - let cache = dir symbolCache + let cache = dir symbolCacheFile pkgdb = dir packageCache create <- liftIO $ cache `isOlderThan` pkgdb diff --git a/Language/Haskell/GhcMod/PathsAndFiles.hs b/Language/Haskell/GhcMod/PathsAndFiles.hs index 4bef50d..eac0775 100644 --- a/Language/Haskell/GhcMod/PathsAndFiles.hs +++ b/Language/Haskell/GhcMod/PathsAndFiles.hs @@ -164,3 +164,9 @@ ghcSandboxPkgDbDir = packageCache :: String packageCache = "package.cache" +-- | Filename of the symbol table cache file. +symbolCache :: Cradle -> FilePath +symbolCache crdl = cradleTempDir crdl symbolCacheFile + +symbolCacheFile :: String +symbolCacheFile = "ghc-mod-0.symbol-cache"