chapelure-0.0.1.0: A diagnostics library for Haskell
Safe HaskellNone
LanguageHaskell2010

Chapelure

Synopsis

Documentation

data Diagnostic Source #

Constructors

Diagnostic 

Fields

  • code :: Maybe Text

    Unique diagnostic code that be used to look up more information. Should be globally unique, and documented for easy searching.

  • severity :: Severity

    Diagnostic severity, this may be used by the Report Handler to adapt the formatting of the diagnostic.

  • message :: Maybe DocText

    A short description of the diagnostic. Rendered at the top.

  • help :: Maybe DocText

    Additional free-form text for the poor bastard at the end of it all. Rendered at the bottom

  • link :: Maybe Text

    Link to visit for a more detailed explanation. Can make use of the $sel:code:Diagnostic component.

  • snippets :: Maybe (NonEmptyVector Snippet)

    Contextual snippet to provide relevant source data.

displayDiagnostic :: Config -> Diagnostic -> IO () Source #

Helper for displaying a diagnostic to standard out, using default layout options

displayDiagnosticAsString :: Config -> Diagnostic -> Text Source #

Helper for rendering a diagnostic to text, using default layout options