Safe Haskell | Safe-Inferred |
---|---|
Language | GHC2021 |
Development.IDE.Core.FileStore
Synopsis
- getFileModTimeContents :: NormalizedFilePath -> Action (UTCTime, Maybe Rope)
- getFileContents :: NormalizedFilePath -> Action (Maybe Rope)
- getUriContents :: NormalizedUri -> Action (Maybe Rope)
- getVersionedTextDoc :: TextDocumentIdentifier -> Action VersionedTextDocumentIdentifier
- setFileModified :: Recorder (WithPriority Log) -> VFSModified -> IdeState -> Bool -> NormalizedFilePath -> IO [Key] -> IO ()
- setSomethingModified :: VFSModified -> IdeState -> String -> IO [Key] -> 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 [Key]
- resetInterfaceStore :: ShakeExtras -> NormalizedFilePath -> STM [Key]
- getModificationTimeImpl :: Bool -> NormalizedFilePath -> Action (Maybe ByteString, ([FileDiagnostic], Maybe FileVersion))
- addIdeGlobal :: IsIdeGlobal a => a -> Rules ()
- getFileContentsImpl :: NormalizedFilePath -> Action ([FileDiagnostic], Maybe (FileVersion, Maybe Rope))
- getModTime :: FilePath -> IO POSIXTime
- isWatchSupported :: LspT Config IO Bool
- registerFileWatches :: [String] -> LspT Config IO Bool
- shareFilePath :: FilePath -> FilePath
- data Log
Documentation
getFileModTimeContents :: NormalizedFilePath -> Action (UTCTime, Maybe Rope) Source #
Returns the modification time and the contents. For VFS paths, the modification time is the current time.
getFileContents :: NormalizedFilePath -> Action (Maybe Rope) Source #
getUriContents :: NormalizedUri -> Action (Maybe Rope) Source #
getVersionedTextDoc :: TextDocumentIdentifier -> Action VersionedTextDocumentIdentifier Source #
Given a text document identifier, annotate it with the latest version.
Like Language.LSP.Server.Core.getVersionedTextDoc, but gets the virtual file from the Shake VFS rather than the LSP VFS.
Arguments
:: Recorder (WithPriority Log) | |
-> VFSModified | |
-> IdeState | |
-> Bool | Was the file saved? |
-> NormalizedFilePath | |
-> IO [Key] | |
-> IO () |
Note that some buffer for a specific file has been modified but not with what changes.
setSomethingModified :: VFSModified -> IdeState -> String -> IO [Key] -> IO () Source #
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 () Source #
typecheckParents :: Recorder (WithPriority Log) -> IdeState -> NormalizedFilePath -> IO () Source #
resetFileStore :: IdeState -> [(NormalizedFilePath, FileChangeType)] -> IO [Key] Source #
Reset the GetModificationTime state of watched files Assumes the list does not include any FOIs
resetInterfaceStore :: ShakeExtras -> NormalizedFilePath -> STM [Key] Source #
Reset the GetModificationTime state of interface files
getModificationTimeImpl :: Bool -> NormalizedFilePath -> Action (Maybe ByteString, ([FileDiagnostic], Maybe FileVersion)) Source #
addIdeGlobal :: IsIdeGlobal a => a -> Rules () Source #
getFileContentsImpl :: NormalizedFilePath -> Action ([FileDiagnostic], Maybe (FileVersion, Maybe Rope)) Source #
shareFilePath :: FilePath -> FilePath Source #