Safe Haskell | Safe-Inferred |
---|---|
Language | GHC2021 |
Synopsis
- errorDiagnostic :: NormalizedFilePath -> PError -> FileDiagnostic
- warningDiagnostic :: NormalizedFilePath -> PWarning -> FileDiagnostic
- positionFromCabalPosition :: Position -> Position
- type FileDiagnostic = (NormalizedFilePath, ShowDiagnostic, Diagnostic)
- data Diagnostic = Diagnostic {}
Documentation
errorDiagnostic :: NormalizedFilePath -> PError -> FileDiagnostic Source #
Produce a diagnostic from a Cabal parser error
warningDiagnostic :: NormalizedFilePath -> PWarning -> FileDiagnostic Source #
Produce a diagnostic from a Cabal parser warning
positionFromCabalPosition :: Position -> Position Source #
Convert a Position
from Cabal to a Range
that LSP understands.
Prefer this function over hand-rolled unpacking/packing, since LSP is zero-based, while Cabal is one-based.
>>>
positionFromCabalPosition $ Lib.Position 1 1
Position 0 0
Re-exports
type FileDiagnostic = (NormalizedFilePath, ShowDiagnostic, Diagnostic) #
data Diagnostic #