| Safe Haskell | None |
|---|---|
| Language | Haskell2010 |
GHC.Internal.Stack.Annotation
Synopsis
- class StackAnnotation a where
- displayStackAnnotation :: a -> String
- stackAnnotationSourceLocation :: a -> Maybe SrcLoc
- displayStackAnnotationShort :: a -> String
- data SomeStackAnnotation where
- SomeStackAnnotation :: forall a. (Typeable a, StackAnnotation a) => a -> SomeStackAnnotation
Documentation
class StackAnnotation a where Source #
StackAnnotations are types which can be pushed onto the call stack
as the payload of AnnFrame stack frames.
Minimal complete definition
Methods
displayStackAnnotation :: a -> String Source #
Display a human readable string for the StackAnnotation.
This is supposed to be the long version of displayStackAnnotationShort
and may contain a source location.
If not provided, displayStackAnnotation is derived from stackAnnotationSourceLocation
and displayStackAnnotationShort.
stackAnnotationSourceLocation :: a -> Maybe SrcLoc Source #
Get the SrcLoc of the given StackAnnotation.
This is optional, SrcLoc are not strictly required for StackAnnotation, but
it is still heavily encouarged to provide a SrcLoc for better IPE backtraces.
displayStackAnnotationShort :: a -> String Source #
The description of the StackAnnotation without any metadata such as source locations.
Pefer implementing displayStackAnnotationShort over displayStackAnnotation.
Instances
data SomeStackAnnotation where Source #
The SomeStackAnnotation type is the root of the stack annotation type hierarchy.
When the call stack is annotated with a value of type a, behind the scenes it is
encapsulated in a SomeStackAnnotation.
Constructors
| SomeStackAnnotation :: forall a. (Typeable a, StackAnnotation a) => a -> SomeStackAnnotation |