| Safe Haskell | Safe-Inferred | 
|---|---|
| Language | Haskell2010 | 
Dhall.LSP.Backend.Diagnostics
Synopsis
- data DhallError
 - diagnose :: DhallError -> [Diagnosis]
 - data Diagnosis = Diagnosis {}
 - explain :: DhallError -> Maybe Diagnosis
 - embedsWithRanges :: Expr Src a -> [(Range, a)]
 - offsetToPosition :: Text -> Int -> Position
 - type Position = (Int, Int)
 - positionFromMegaparsec :: SourcePos -> Position
 - positionToOffset :: Text -> Position -> Int
 - data Range = Range {}
 - rangeFromDhall :: Src -> Range
 - subtractPosition :: Position -> Position -> Position
 
Documentation
data DhallError Source #
A Dhall error. Covers parsing, resolving of imports, typechecking and normalisation.
diagnose :: DhallError -> [Diagnosis] Source #
Give a short diagnosis for a given error that can be shown to the end user.
A diagnosis, optionally tagged with a source code range.
explain :: DhallError -> Maybe Diagnosis Source #
Give a detailed explanation for the given error; if no detailed explanation
   is available return Nothing instead.
embedsWithRanges :: Expr Src a -> [(Range, a)] Source #
Collect all Embed constructors (i.e. imports if the expression has type
   `Expr Src Import`) wrapped in a Note constructor and return them together
   with their associated range in the source code.
type Position = (Int, Int) Source #
A (line, col) pair representing a position in a source file; 0-based.
rangeFromDhall :: Src -> Range Source #
Convert a source range from Dhalls Src format. The returned range is
   "tight", that is, does not contain any trailing whitespace.