ghcide-2.7.0.0: The core of an IDE

Safe Haskell | None
Language | GHC2021

Development.IDE.Core.FileStore

Synopsis

- getFileContents :: NormalizedFilePath -> Action (UTCTime, Maybe Text)
- setFileModified :: Recorder (WithPriority Log) -> VFSModified -> IdeState -> Bool -> NormalizedFilePath -> IO ()
- setSomethingModified :: VFSModified -> IdeState -> [Key] -> String -> IO ()
- fileStoreRules :: Recorder (WithPriority Log) -> (NormalizedFilePath -> Action Bool) -> Rules ()
- modificationTime :: FileVersion -> Maybe UTCTime
- typecheckParents :: Recorder (WithPriority Log) -> IdeState -> NormalizedFilePath -> IO ()
- resetFileStore :: IdeState -> [(NormalizedFilePath, FileChangeType)] -> IO ()
- resetInterfaceStore :: ShakeExtras -> NormalizedFilePath -> STM ()
- getModificationTimeImpl :: Bool -> NormalizedFilePath -> Action (Maybe ByteString, ([FileDiagnostic], Maybe FileVersion))
- addIdeGlobal :: IsIdeGlobal a => a -> Rules ()
- getFileContentsImpl :: NormalizedFilePath -> Action ([FileDiagnostic], Maybe (FileVersion, Maybe Text))
- getModTime :: FilePath -> IO POSIXTime
- isWatchSupported :: LspT Config IO Bool
- registerFileWatches :: [String] -> LspT Config IO Bool
- shareFilePath :: FilePath -> FilePath
- data Log
  - = LogCouldNotIdentifyReverseDeps !NormalizedFilePath
  - | LogTypeCheckingReverseDeps !NormalizedFilePath !(Maybe [NormalizedFilePath])
  - | LogShake Log

# Documentation

getFileContents :: NormalizedFilePath -> Action (UTCTime, Maybe Text) #

Returns the modification time and the contents. For VFS paths, the modification time is the current time.

setFileModified #

Arguments

:: Recorder (WithPriority Log) |
-> VFSModified |
-> IdeState |
-> Bool | Was the file saved?
-> NormalizedFilePath |
-> IO () |

Note that some buffer for a specific file has been modified but not with what changes.

setSomethingModified :: VFSModified -> IdeState -> [Key] -> String -> IO () #

Note that some keys have been modified and restart the session Only valid if the virtual file system was initialised by LSP, as that independently tracks which files are modified.

fileStoreRules :: Recorder (WithPriority Log) -> (NormalizedFilePath -> Action Bool) -> Rules () #

modificationTime :: FileVersion -> Maybe UTCTime #

typecheckParents :: Recorder (WithPriority Log) -> IdeState -> NormalizedFilePath -> IO () #

resetFileStore :: IdeState -> [(NormalizedFilePath, FileChangeType)] -> IO () #

Reset the GetModificationTime state of watched files Assumes the list does not include any FOIs

resetInterfaceStore :: ShakeExtras -> NormalizedFilePath -> STM () #

Reset the GetModificationTime state of interface files

getModificationTimeImpl :: Bool -> NormalizedFilePath -> Action (Maybe ByteString, ([FileDiagnostic], Maybe FileVersion)) #

addIdeGlobal :: IsIdeGlobal a => a -> Rules () #

getFileContentsImpl :: NormalizedFilePath -> Action ([FileDiagnostic], Maybe (FileVersion, Maybe Text)) #

getModTime :: FilePath -> IO POSIXTime #

isWatchSupported :: LspT Config IO Bool #

registerFileWatches :: [String] -> LspT Config IO Bool #

shareFilePath :: FilePath -> FilePath #

data Log #

Constructors

LogCouldNotIdentifyReverseDeps !NormalizedFilePath |
LogTypeCheckingReverseDeps !NormalizedFilePath !(Maybe [NormalizedFilePath]) |
LogShake Log |

#### Instances

Instances details

Show Log # |
Instance details Defined in Development.IDE.Core.FileStore Methods showsPrec :: Int -> Log -> ShowS # show :: Log -> String # showList :: [Log] -> ShowS #
Pretty Log # |
Instance details Defined in Development.IDE.Core.FileStore Methods pretty :: Log -> Doc ann # prettyList :: [Log] -> Doc ann #