Safe Haskell | Safe-Inferred |
---|---|
Language | GHC2021 |
The language server state definition.
Synopsis
- data State = State {}
- emptyState :: State
- getStaleContent :: State -> FilePath -> Maybe VirtualFile
- getStaleMapping :: State -> FilePath -> Maybe PositionMapping
- updateStaleContent :: FilePath -> VirtualFile -> LoadedProg -> State -> State
- updateStaleMapping :: Maybe FilePath -> Maybe PositionMapping -> State -> State
Documentation
The state of the language server.
State | |
|
emptyState :: State Source #
Initial state.
getStaleContent :: State -> FilePath -> Maybe VirtualFile Source #
Get the contents of a stale (last successfully complied) file's contents.
getStaleMapping :: State -> FilePath -> Maybe PositionMapping Source #
Get the PositionMapping for a file.
updateStaleContent :: FilePath -> VirtualFile -> LoadedProg -> State -> State Source #
Update the state with another pair of file_path and contents. Could do a clean up becausae there is no need to store files that are not in lpFilePaths prog.
updateStaleMapping :: Maybe FilePath -> Maybe PositionMapping -> State -> State Source #
Update the state with another pair of file_path and PositionMapping.