Module GHC.Stack.Types

Data Types

data CallStack

Type of CallStack``s constructed automatically from ``HasCallStack constraints.

Use getCallStack to deconstruct the CallStack.


PushCallStack (TextLit, SrcLoc, CallStack)

FreezeCallStack CallStack

type HasCallStack

= IP “callStack” CallStack

Request a CallStack.

Calls to functions with this constraint will be added to the callstack. You can get access to the current call stack with callStack.

Note that if the call stack is reset if any function in between does not have a HasCallStack constraint.

data SrcLoc

Location in the source code.

Line and column are 1-based.


Field Type Description
srcLocPackage TextLit  
srcLocModule TextLit  
srcLocFile TextLit  
srcLocStartLine Int  
srcLocStartCol Int  
srcLocEndLine Int  
srcLocEndCol Int