trace-0.1.0.2: A monad transformer for tracing provenience of errors

Safe HaskellSafe-Inferred
LanguageHaskell2010

Control.Monad.Trace.ErrorTrace

Synopsis

Documentation

data ErrorTrace t e Source

A datatype containing an error and its provenience(s).

Constructors

ErrorTrace 

Fields

_etError :: !e

The error

_etTrace :: ![Seq t]

The list of traces (for each path tried)

Instances

(Show t, Show e) => Show (ErrorTrace t e) 
Monoid e => Monoid (ErrorTrace t e) 

_ErrorTrace :: (Choice p, Functor f) => p (ErrorTrace t e) (f (ErrorTrace t' e')) -> p (e, [Seq t]) (f (e', [Seq t'])) Source

An isomorphism ErrorTrace t e ≅ (e, Seq t).

etError :: Functor f => (e -> f e') -> ErrorTrace t e -> f (ErrorTrace t e') Source

A lens ErrorTrace t e → e.

etTrace :: Functor f => ([Seq t] -> f [Seq t']) -> ErrorTrace t e -> f (ErrorTrace t' e) Source

A lens ErrorTrace t e → Seq t.