| Safe Haskell | None |
|---|---|
| Language | GHC2021 |
Futhark.LSP.Tool
Description
Generally useful definition used in various places in the language server implementation.
Synopsis
- getHoverInfoFromState :: State -> Maybe FilePath -> Int -> Int -> Maybe Hover
- findDefinitionRange :: State -> Maybe FilePath -> Int -> Int -> Maybe Location
- rangeFromLoc :: Loc -> Range
- posToUri :: Pos -> Uri
- computeMapping :: State -> Maybe FilePath -> LspM () (Maybe PositionMapping)
- transformVFS :: VFS -> Map FilePath Text
- logWithSeverity :: forall c (m :: Type -> Type). MonadLsp c m => Severity -> LogAction m Text
- type Execute a = ExceptT (Text, LSPErrorCodes |? ErrorCodes) (LspT () IO) a
- bindingsInRange :: Range -> State -> FilePath -> Maybe [(VName, BoundTo)]
- bindingsInState :: State -> Maybe (Map VName BoundTo)
- filterByLspRange :: Foldable t => Maybe PositionMapping -> Range -> FilePath -> (a -> Loc) -> t a -> Maybe [a]
Documentation
getHoverInfoFromState :: State -> Maybe FilePath -> Int -> Int -> Maybe Hover Source #
Retrieve hover info for the definition referenced at the given
file at the given line and column number (the two Ints).
findDefinitionRange :: State -> Maybe FilePath -> Int -> Int -> Maybe Location Source #
Find the location of the definition referenced at the given file
at the given line and column number (the two Ints).
computeMapping :: State -> Maybe FilePath -> LspM () (Maybe PositionMapping) Source #
Entry point for computing PositionMapping.
transformVFS :: VFS -> Map FilePath Text Source #
Transform VFS to a map of file paths to file contents. This is used to pass the file contents to the compiler.
logWithSeverity :: forall c (m :: Type -> Type). MonadLsp c m => Severity -> LogAction m Text Source #
type Execute a = ExceptT (Text, LSPErrorCodes |? ErrorCodes) (LspT () IO) a Source #
Request Handler code usually runs in this monad
filterByLspRange :: Foldable t => Maybe PositionMapping -> Range -> FilePath -> (a -> Loc) -> t a -> Maybe [a] Source #