| Safe Haskell | None |
|---|---|
| Language | Haskell2010 |
Language.Cimple.Diagnostics
Documentation
data DiagnosticLevel Source #
Constructors
| ErrorLevel | |
| WarningLevel | |
| NoteLevel | |
| HelpLevel |
Instances
| Eq DiagnosticLevel Source # | |
Defined in Language.Cimple.Diagnostics Methods (==) :: DiagnosticLevel -> DiagnosticLevel -> Bool # (/=) :: DiagnosticLevel -> DiagnosticLevel -> Bool # | |
| Ord DiagnosticLevel Source # | |
Defined in Language.Cimple.Diagnostics Methods compare :: DiagnosticLevel -> DiagnosticLevel -> Ordering # (<) :: DiagnosticLevel -> DiagnosticLevel -> Bool # (<=) :: DiagnosticLevel -> DiagnosticLevel -> Bool # (>) :: DiagnosticLevel -> DiagnosticLevel -> Bool # (>=) :: DiagnosticLevel -> DiagnosticLevel -> Bool # max :: DiagnosticLevel -> DiagnosticLevel -> DiagnosticLevel # min :: DiagnosticLevel -> DiagnosticLevel -> DiagnosticLevel # | |
| Show DiagnosticLevel Source # | |
Defined in Language.Cimple.Diagnostics Methods showsPrec :: Int -> DiagnosticLevel -> ShowS # show :: DiagnosticLevel -> String # showList :: [DiagnosticLevel] -> ShowS # | |
data DiagnosticSpan pos Source #
Constructors
| DiagnosticSpan | |
data Diagnostic pos Source #
Constructors
| Diagnostic | |
Fields
| |
Instances
| HasDiagnosticsRich [Diagnostic pos] pos Source # | |
Defined in Language.Cimple.Diagnostics Methods addDiagnosticRich :: Diagnostic pos -> [Diagnostic pos] -> [Diagnostic pos] Source # | |
class IsPosition p where Source #
class IsPosition pos => HasDiagnosticInfo at pos | at -> pos where Source #
Methods
getDiagnosticInfo :: FilePath -> at -> (pos, Int) Source #
Instances
| HasDiagnosticInfo (Node (Lexeme Text)) CimplePos Source # | |
Defined in Language.Cimple.Diagnostics | |
| HasDiagnosticInfo (Lexeme Text) CimplePos Source # | |
Defined in Language.Cimple.Diagnostics | |
Constructors
| CimplePos | |
Fields
| |
Instances
| Eq CimplePos Source # | |
| Ord CimplePos Source # | |
| Show CimplePos Source # | |
| IsPosition CimplePos Source # | |
| HasDiagnosticInfo (Node (Lexeme Text)) CimplePos Source # | |
Defined in Language.Cimple.Diagnostics | |
| HasDiagnosticInfo (Lexeme Text) CimplePos Source # | |
Defined in Language.Cimple.Diagnostics | |
type DiagnosticsT diags a = State diags a Source #
type Diagnostics a = DiagnosticsT [Text] a Source #
class HasDiagnostics a where Source #
Methods
addDiagnostic :: Text -> a -> a Source #
Instances
| HasDiagnostics [Text] Source # | |
Defined in Language.Cimple.Diagnostics | |
class HasDiagnosticsRich a pos | a -> pos where Source #
Methods
addDiagnosticRich :: Diagnostic pos -> a -> a Source #
Instances
| HasDiagnosticsRich [Diagnostic pos] pos Source # | |
Defined in Language.Cimple.Diagnostics Methods addDiagnosticRich :: Diagnostic pos -> [Diagnostic pos] -> [Diagnostic pos] Source # | |
warn :: (HasLocation at, HasDiagnostics diags) => FilePath -> at -> Text -> DiagnosticsT diags () Source #
warnRich :: HasDiagnosticsRich diags pos => Diagnostic pos -> DiagnosticsT diags () Source #
renderPure :: IsPosition pos => Map FilePath [Text] -> [Diagnostic pos] -> [Doc AnsiStyle] Source #
diagToText :: IsPosition pos => Diagnostic pos -> Text Source #