ermine-0.6: Ermine

Copyright(c) Edward Kmett and Dan Doel 2012
LicenseBSD3
MaintainerEdward Kmett <ekmett@gmail.com>
Stabilityexperimental
Portabilitynon-portable
Safe HaskellNone
LanguageHaskell2010

Ermine.Diagnostic

Contents

Description

This module re-exports Rendering from trifecta along with our in-house diagnostic type.

This allows the non-parsing modules to not have to concern themselves with how we choose to represent source locations.

Synopsis

Rendering

data Rendering :: *

Instances

Read Rendering 
Show Rendering 
Monoid Rendering 
Semigroup Rendering 
Pretty Rendering 
HasDelta Rendering 
Renderable Rendering 
HasRendering Rendering 
Reducer Span Rendering 
Reducer Fixit Rendering 
Reducer Caret Rendering 
Reducer (Spanned a) Rendering 
Reducer (Careted a) Rendering 

class HasRendering t0 where

Minimal complete definition

rendering

Methods

rendering :: Lens' t0 Rendering

renderingDelta :: Lens' t0 Delta

renderingLine :: Lens' t0 (Lines -> Lines)

renderingLineBytes :: Lens' t0 Int64

renderingLineLen :: Lens' t0 Int64

renderingOverlays :: Lens' t0 (Delta -> Lines -> Lines)

Diagnostics

class AsDiagnostic t where Source

This provides the _Diagnostic prism that can be used when matching against SomeException or in a custom Error type.

Minimal complete definition

Nothing

Methods

_Diagnostic :: Prism' t Diagnostic Source

class HasDiagnostic t where Source

Minimal complete definition

diagnostic

data Err :: *

Constructors

Err (Maybe Doc) [Doc] (Set String) 

Instances

Monoid Err 
Semigroup Err 
HasErr Err 

class HasErr t0 where

Minimal complete definition

err

Methods

err :: Lens' t0 Err

expected :: Lens' t0 (Set String)

footnotes :: Lens' t0 [Doc]

reason :: Lens' t0 (Maybe Doc)

die :: HasRendering r => r -> Text -> Diagnostic Source

Construct a diagnostic