| Copyright | (c) Mesabloo 2021-2022 |
|---|---|
| License | BSD3 |
| Stability | experimental |
| Portability | Portable |
| Safe Haskell | Safe-Inferred |
| Language | Haskell2010 |
Error.Diagnose.Compat.Parsec
Description
Synopsis
- diagnosticFromParseError :: forall msg. (IsString msg, HasHints Void msg) => (ParseError -> Bool) -> Maybe msg -> msg -> Maybe [Note msg] -> ParseError -> Diagnostic msg
- errorDiagnosticFromParseError :: forall msg. (IsString msg, HasHints Void msg) => Maybe msg -> msg -> Maybe [Note msg] -> ParseError -> Diagnostic msg
- warningDiagnosticFromParseError :: forall msg. (IsString msg, HasHints Void msg) => Maybe msg -> msg -> Maybe [Note msg] -> ParseError -> Diagnostic msg
- class HasHints e msg where
Documentation
diagnosticFromParseError Source #
Arguments
| :: 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 [Note msg] | Default hints |
| -> ParseError | The |
| -> Diagnostic msg |
Generates a diagnostic from a ParseError.
errorDiagnosticFromParseError Source #
Arguments
| :: forall msg. (IsString msg, HasHints Void msg) | |
| => Maybe msg | An optional error code |
| -> msg | The main error message of the diagnostic |
| -> Maybe [Note msg] | Default hints |
| -> ParseError | The |
| -> Diagnostic msg |
Generates an error diagnostic from a ParseError.
warningDiagnosticFromParseError Source #
Arguments
| :: forall msg. (IsString msg, HasHints Void msg) | |
| => Maybe msg | An optional error code |
| -> msg | The main error message of the diagnostic |
| -> Maybe [Note msg] | Default hints |
| -> ParseError | The |
| -> Diagnostic msg |
Generates a warning diagnostic from a ParseError.