Safe Haskell | None |
---|---|
Language | Haskell2010 |
Synopsis
- data Diagnostic = Diagnostic {}
- data ShowDiagnostic
- type FileDiagnostic = (NormalizedFilePath, ShowDiagnostic, Diagnostic)
- type IdeResult v = ([FileDiagnostic], Maybe v)
- data DiagnosticSeverity
- type DiagnosticStore = HashMap NormalizedUri StoreItem
- newtype List a = List [a]
- ideErrorText :: NormalizedFilePath -> Text -> FileDiagnostic
- ideErrorWithSource :: Maybe DiagnosticSource -> Maybe DiagnosticSeverity -> a -> Text -> (a, ShowDiagnostic, Diagnostic)
- showDiagnostics :: [FileDiagnostic] -> Text
- showDiagnosticsColored :: [FileDiagnostic] -> Text
Documentation
data Diagnostic #
Instances
data ShowDiagnostic Source #
Defines whether a particular diagnostic should be reported back to the user.
One important use case is "missing signature" code lenses, for which we need to enable the corresponding warning during type checking. However, we do not want to show the warning unless the programmer asks for it (#261).
Instances
Eq ShowDiagnostic Source # | |
Defined in Development.IDE.Types.Diagnostics (==) :: ShowDiagnostic -> ShowDiagnostic -> Bool # (/=) :: ShowDiagnostic -> ShowDiagnostic -> Bool # | |
Ord ShowDiagnostic Source # | |
Defined in Development.IDE.Types.Diagnostics compare :: ShowDiagnostic -> ShowDiagnostic -> Ordering # (<) :: ShowDiagnostic -> ShowDiagnostic -> Bool # (<=) :: ShowDiagnostic -> ShowDiagnostic -> Bool # (>) :: ShowDiagnostic -> ShowDiagnostic -> Bool # (>=) :: ShowDiagnostic -> ShowDiagnostic -> Bool # max :: ShowDiagnostic -> ShowDiagnostic -> ShowDiagnostic # min :: ShowDiagnostic -> ShowDiagnostic -> ShowDiagnostic # | |
Show ShowDiagnostic Source # | |
Defined in Development.IDE.Types.Diagnostics showsPrec :: Int -> ShowDiagnostic -> ShowS # show :: ShowDiagnostic -> String # showList :: [ShowDiagnostic] -> ShowS # | |
NFData ShowDiagnostic Source # | |
Defined in Development.IDE.Types.Diagnostics rnf :: ShowDiagnostic -> () # |
type FileDiagnostic = (NormalizedFilePath, ShowDiagnostic, Diagnostic) Source #
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.
type IdeResult v = ([FileDiagnostic], Maybe v) Source #
The result of an IDE operation. Warnings and errors are in the Diagnostic, and a value is in the Maybe. For operations that throw an error you expect a non-empty list of diagnostics, at least one of which is an error, and a Nothing. For operations that succeed you expect perhaps some warnings and a Just. For operations that depend on other failing operations you may get empty diagnostics and a Nothing, to indicate this phase throws no fresh errors but still failed.
A rule on a file should only return diagnostics for that given file. It should not propagate diagnostic errors through multiple phases.
data DiagnosticSeverity #
Instances
This data type is used to host a FromJSON instance for the encoding used by elisp, where an empty list shows up as "null"
List [a] |
Instances
ideErrorText :: NormalizedFilePath -> Text -> FileDiagnostic Source #
ideErrorWithSource :: Maybe DiagnosticSource -> Maybe DiagnosticSeverity -> a -> Text -> (a, ShowDiagnostic, Diagnostic) Source #
showDiagnostics :: [FileDiagnostic] -> Text Source #
showDiagnosticsColored :: [FileDiagnostic] -> Text Source #