ghcide-1.6.0.0: The core of an IDE
Safe HaskellNone
LanguageHaskell2010

Development.IDE.Core.FileStore

Synopsis

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

setFileModified Source #

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 -> [Key] -> String -> 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.

data VFSHandle 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

Instances details
IsIdeGlobal VFSHandle Source # 
Instance details

Defined in Development.IDE.Core.Shake

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

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

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

Reset the GetModificationTime state of interface files