Copyright | (c) Mesabloo 2021 |
---|---|
License | BSD3 |
Stability | experimental |
Portability | Portable |
Safe Haskell | None |
Language | Haskell2010 |
Synopsis
- diagnosticFromParseError :: forall msg. (IsString msg, HasHints Void msg) => (ParseError -> Bool) -> Maybe msg -> msg -> Maybe [msg] -> ParseError -> Diagnostic msg
- errorDiagnosticFromParseError :: forall msg. (IsString msg, HasHints Void msg) => Maybe msg -> msg -> Maybe [msg] -> ParseError -> Diagnostic msg
- warningDiagnosticFromParseError :: forall msg. (IsString msg, HasHints Void msg) => Maybe msg -> msg -> Maybe [msg] -> ParseError -> Diagnostic msg
- class HasHints e msg where
- hints :: e -> [msg]
Documentation
diagnosticFromParseError Source #
:: forall msg. (IsString msg, HasHints Void msg) | |
=> (ParseError -> Bool) | Determine whether the diagnostic is an error or a warning |
-> Maybe msg | An optional error code |
-> msg | The main error of the diagnostic |
-> Maybe [msg] | Default hints |
-> ParseError | The |
-> Diagnostic msg |
Generates a diagnostic from a ParseError
.
errorDiagnosticFromParseError Source #
:: forall msg. (IsString msg, HasHints Void msg) | |
=> Maybe msg | An optional error code |
-> msg | The main error message of the diagnostic |
-> Maybe [msg] | Default hints |
-> ParseError | The |
-> Diagnostic msg |
Generates an error diagnostic from a ParseError
.
warningDiagnosticFromParseError Source #
:: forall msg. (IsString msg, HasHints Void msg) | |
=> Maybe msg | An optional error code |
-> msg | The main error message of the diagnostic |
-> Maybe [msg] | Default hints |
-> ParseError | The |
-> Diagnostic msg |
Generates a warning diagnostic from a ParseError
.