ghc-experimental-9.1500.0: Experimental features of GHC's standard library and unstable GHC internals.
Safe HaskellNone
LanguageHaskell2010

GHC.Exception.Backtrace.Experimental

Synopsis

Backtrace mechanisms

data BacktraceMechanism Source #

How to collect a backtrace when an exception is thrown.

Constructors

CostCentreBacktrace

collect cost-centre stack backtraces (only available when built with profiling)

HasCallStackBacktrace

collect HasCallStack backtraces

ExecutionBacktrace

collect backtraces via native execution stack unwinding (e.g. using DWARF debug information)

IPEBacktrace

collect backtraces from Info Table Provenance Entries

getBacktraceMechanismState :: BacktraceMechanism -> IO Bool Source #

Will the given BacktraceMechanism be used when collecting backtraces?

setBacktraceMechanismState :: BacktraceMechanism -> Bool -> IO () Source #

Set whether the given BacktraceMechanism will be used when collecting backtraces?

Collecting backtraces

displayBacktraces :: Backtraces -> String Source #

Render a set of backtraces to a human-readable string.

collectBacktraces :: (?callStack :: CallStack) => IO Backtraces Source #

Collect a set of Backtraces.

Collecting exception annotations on throwing Exceptions

data CollectExceptionAnnotationMechanism Source #

How to collect ExceptionAnnotations on throwing Exceptions.

getCollectExceptionAnnotationMechanism :: IO CollectExceptionAnnotationMechanism Source #

Returns the current callback for collecting ExceptionAnnotations on throwing Exceptions.

setCollectExceptionAnnotation :: ExceptionAnnotation a => (HasCallStack => IO a) -> IO () Source #

Set the callback for collecting an ExceptionAnnotation.