Safe Haskell | None |
---|---|
Language | GHC2021 |
Ide.Plugin.Cabal.Diagnostics
Contents
Synopsis
- errorDiagnostic :: NormalizedFilePath -> PError -> FileDiagnostic
- warningDiagnostic :: NormalizedFilePath -> PWarning -> FileDiagnostic
- positionFromCabalPosition :: Position -> Position
- fatalParseErrorDiagnostic :: NormalizedFilePath -> Text -> FileDiagnostic
- data FileDiagnostic
- 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
fatalParseErrorDiagnostic :: NormalizedFilePath -> Text -> FileDiagnostic Source #
Produce a diagnostic for a fatal Cabal parser error.
Re-exports
data FileDiagnostic #
Human readable diagnostics for a specific file.
This type packages a pretty printed, human readable error message along with the related source location so that we can display the error on either the console or in the IDE at the right source location.
It also optionally keeps a structured diagnostic message GhcMessage in StructuredMessage.
Instances
data Diagnostic #
Constructors
Diagnostic | |
Instances
FromJSON Diagnostic | |||||
ToJSON Diagnostic | |||||
Defined in Language.LSP.Protocol.Internal.Types.Diagnostic Methods toJSON :: Diagnostic -> Value # toEncoding :: Diagnostic -> Encoding # toJSONList :: [Diagnostic] -> Value # toEncodingList :: [Diagnostic] -> Encoding # omitField :: Diagnostic -> Bool # | |||||
Generic Diagnostic | |||||
Defined in Language.LSP.Protocol.Internal.Types.Diagnostic Associated Types
| |||||
Show Diagnostic | |||||
Defined in Language.LSP.Protocol.Internal.Types.Diagnostic Methods showsPrec :: Int -> Diagnostic -> ShowS # show :: Diagnostic -> String # showList :: [Diagnostic] -> ShowS # | |||||
NFData Diagnostic | |||||
Defined in Language.LSP.Protocol.Internal.Types.Diagnostic Methods rnf :: Diagnostic -> () # | |||||
Eq Diagnostic | |||||
Ord Diagnostic | |||||
Defined in Language.LSP.Protocol.Internal.Types.Diagnostic Methods compare :: Diagnostic -> Diagnostic -> Ordering # (<) :: Diagnostic -> Diagnostic -> Bool # (<=) :: Diagnostic -> Diagnostic -> Bool # (>) :: Diagnostic -> Diagnostic -> Bool # (>=) :: Diagnostic -> Diagnostic -> Bool # max :: Diagnostic -> Diagnostic -> Diagnostic # min :: Diagnostic -> Diagnostic -> Diagnostic # | |||||
Hashable Diagnostic | |||||
Pretty Diagnostic | |||||
HasMessage Diagnostic Text | |||||
Defined in Language.LSP.Protocol.Types.Lens Methods | |||||
HasRange Diagnostic Range | |||||
Defined in Language.LSP.Protocol.Types.Lens Methods | |||||
HasCode Diagnostic (Maybe (Int32 |? Text)) | |||||
Defined in Language.LSP.Protocol.Types.Lens | |||||
HasCodeDescription Diagnostic (Maybe CodeDescription) | |||||
Defined in Language.LSP.Protocol.Types.Lens Methods codeDescription :: Lens' Diagnostic (Maybe CodeDescription) | |||||
HasData_ Diagnostic (Maybe Value) | |||||
Defined in Language.LSP.Protocol.Types.Lens Methods data_ :: Lens' Diagnostic (Maybe Value) | |||||
HasDiagnostics CodeAction (Maybe [Diagnostic]) | |||||
Defined in Language.LSP.Protocol.Types.Lens Methods diagnostics :: Lens' CodeAction (Maybe [Diagnostic]) | |||||
HasDiagnostics CodeActionContext [Diagnostic] | |||||
Defined in Language.LSP.Protocol.Types.Lens Methods diagnostics :: Lens' CodeActionContext [Diagnostic] | |||||
HasDiagnostics PublishDiagnosticsParams [Diagnostic] | |||||
Defined in Language.LSP.Protocol.Types.Lens Methods diagnostics :: Lens' PublishDiagnosticsParams [Diagnostic] | |||||
HasItems FullDocumentDiagnosticReport [Diagnostic] | |||||
Defined in Language.LSP.Protocol.Types.Lens Methods items :: Lens' FullDocumentDiagnosticReport [Diagnostic] | |||||
HasItems RelatedFullDocumentDiagnosticReport [Diagnostic] | |||||
Defined in Language.LSP.Protocol.Types.Lens Methods items :: Lens' RelatedFullDocumentDiagnosticReport [Diagnostic] | |||||
HasItems WorkspaceFullDocumentDiagnosticReport [Diagnostic] | |||||
Defined in Language.LSP.Protocol.Types.Lens Methods items :: Lens' WorkspaceFullDocumentDiagnosticReport [Diagnostic] | |||||
HasRelatedInformation Diagnostic (Maybe [DiagnosticRelatedInformation]) | |||||
Defined in Language.LSP.Protocol.Types.Lens Methods relatedInformation :: Lens' Diagnostic (Maybe [DiagnosticRelatedInformation]) | |||||
HasSeverity Diagnostic (Maybe DiagnosticSeverity) | |||||
Defined in Language.LSP.Protocol.Types.Lens Methods | |||||
HasSource Diagnostic (Maybe Text) | |||||
Defined in Language.LSP.Protocol.Types.Lens Methods source :: Lens' Diagnostic (Maybe Text) | |||||
HasTags Diagnostic (Maybe [DiagnosticTag]) | |||||
Defined in Language.LSP.Protocol.Types.Lens Methods tags :: Lens' Diagnostic (Maybe [DiagnosticTag]) | |||||
type Rep Diagnostic | |||||
Defined in Language.LSP.Protocol.Internal.Types.Diagnostic type Rep Diagnostic = D1 ('MetaData "Diagnostic" "Language.LSP.Protocol.Internal.Types.Diagnostic" "lsp-types-2.3.0.1-25mMreyTkQ2H8Rsux8iEVM" 'False) (C1 ('MetaCons "Diagnostic" 'PrefixI 'True) (((S1 ('MetaSel ('Just "_range") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 Range) :*: S1 ('MetaSel ('Just "_severity") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe DiagnosticSeverity))) :*: (S1 ('MetaSel ('Just "_code") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe (Int32 |? Text))) :*: S1 ('MetaSel ('Just "_codeDescription") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe CodeDescription)))) :*: ((S1 ('MetaSel ('Just "_source") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe Text)) :*: S1 ('MetaSel ('Just "_message") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 Text)) :*: (S1 ('MetaSel ('Just "_tags") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe [DiagnosticTag])) :*: (S1 ('MetaSel ('Just "_relatedInformation") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe [DiagnosticRelatedInformation])) :*: S1 ('MetaSel ('Just "_data_") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe Value))))))) |