futhark
Safe HaskellNone
LanguageGHC2021

Futhark.LSP.Tool

Description

Generally useful definition used in various places in the language server implementation.

Synopsis

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).

rangeFromLoc :: Loc -> Range Source #

Create an LSP Range from a Futhark Loc.

posToUri :: Pos -> Uri Source #

Convert a Futhark Pos to an LSP Uri.

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