Custom cradle support
This commit is contained in:
@@ -193,7 +193,6 @@ cabalBuildPlatform = unsafePerformIO $ buildPlatform
|
||||
packageCache :: String
|
||||
packageCache = "package.cache"
|
||||
|
||||
|
||||
-- | Filename of the symbol table cache file.
|
||||
symbolCache :: Cradle -> FilePath
|
||||
symbolCache crdl = cradleTempDir crdl </> symbolCacheFile
|
||||
@@ -206,3 +205,13 @@ resolvedComponentsCacheFile = setupConfigPath <.> "ghc-mod.resolved-components"
|
||||
|
||||
cabalHelperCacheFile :: String
|
||||
cabalHelperCacheFile = setupConfigPath <.> "ghc-mod.cabal-helper"
|
||||
|
||||
-- | @findCradleFile dir@. Searches for a @.ghc-mod.cradle@ file in @dir@.
|
||||
-- If it exists in the given directory it is returned otherwise @findCradleFile@ returns @Nothing@
|
||||
findCradleFile :: FilePath -> IO (Maybe FilePath)
|
||||
findCradleFile directory = do
|
||||
let path = directory </> "ghc-mod.cradle"
|
||||
exists <- doesFileExist $ path
|
||||
case exists of
|
||||
True -> return $ Just path
|
||||
False -> return Nothing
|
||||
|
||||
Reference in New Issue
Block a user