Safe Haskell | None |
---|---|
Language | Haskell2010 |
Development.IDE.Core.FileStore
Synopsis
- getFileContents :: NormalizedFilePath -> Action (UTCTime, Maybe Text)
- $sel:getVirtualFile:VFSHandle :: VFSHandle -> NormalizedUri -> IO (Maybe VirtualFile)
- setFileModified :: IdeState -> Bool -> NormalizedFilePath -> IO ()
- setSomethingModified :: IdeState -> [SomeShakeValue] -> IO ()
- fileStoreRules :: VFSHandle -> (NormalizedFilePath -> Action Bool) -> Rules ()
- modificationTime :: FileVersion -> Maybe UTCTime
- typecheckParents :: IdeState -> NormalizedFilePath -> IO ()
- data VFSHandle
- makeVFSHandle :: IO VFSHandle
- makeLSPVFSHandle :: LanguageContextEnv c -> VFSHandle
- resetFileStore :: IdeState -> [FileEvent] -> IO ()
- resetInterfaceStore :: ShakeExtras -> NormalizedFilePath -> IO ()
- getModificationTimeImpl :: VFSHandle -> Bool -> NormalizedFilePath -> Action (Maybe ByteString, ([FileDiagnostic], Maybe FileVersion))
- addIdeGlobal :: IsIdeGlobal a => a -> Rules ()
- getFileContentsImpl :: VFSHandle -> NormalizedFilePath -> Action ([FileDiagnostic], Maybe (FileVersion, Maybe Text))
- getModTime :: FilePath -> IO POSIXTime
- isWatchSupported :: LspT Config IO Bool
- registerFileWatches :: [String] -> LspT Config IO Bool
Documentation
getFileContents :: NormalizedFilePath -> Action (UTCTime, Maybe Text) Source #
Returns the modification time and the contents. For VFS paths, the modification time is the current time.
$sel:getVirtualFile:VFSHandle :: VFSHandle -> NormalizedUri -> IO (Maybe VirtualFile) Source #
get the contents of a virtual file
Arguments
:: 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 :: IdeState -> [SomeShakeValue] -> 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 :: VFSHandle -> (NormalizedFilePath -> Action Bool) -> Rules () Source #
typecheckParents :: IdeState -> NormalizedFilePath -> IO () Source #
haskell-lsp manages the VFS internally and automatically so we cannot use
the builtin VFS without spawning up an LSP server. To be able to test things
like setBufferModified
we abstract over the VFS implementation.
Instances
IsIdeGlobal VFSHandle Source # | |
Defined in Development.IDE.Core.Shake |
resetFileStore :: IdeState -> [FileEvent] -> IO () Source #
Reset the GetModificationTime state of watched files
resetInterfaceStore :: ShakeExtras -> NormalizedFilePath -> IO () Source #
Reset the GetModificationTime state of interface files
getModificationTimeImpl :: VFSHandle -> Bool -> NormalizedFilePath -> Action (Maybe ByteString, ([FileDiagnostic], Maybe FileVersion)) Source #
addIdeGlobal :: IsIdeGlobal a => a -> Rules () Source #
getFileContentsImpl :: VFSHandle -> NormalizedFilePath -> Action ([FileDiagnostic], Maybe (FileVersion, Maybe Text)) Source #