Data.CallStack

call-stack-0.4.0: Use GHC call-stacks in a backward compatible way

Safe Haskell | Safe-Inferred
Language | Haskell2010

Data.CallStack

Synopsis

- type HasCallStack = ?callStack :: CallStack
- type CallStack = [(String, SrcLoc)]
- data SrcLoc = SrcLoc {
  - srcLocPackage :: [Char]
  - srcLocModule :: [Char]
  - srcLocFile :: [Char]
  - srcLocStartLine :: Int
  - srcLocStartCol :: Int
  - srcLocEndLine :: Int
  - srcLocEndCol :: Int
  }
- callStack :: HasCallStack => CallStack
- callSite :: HasCallStack => Maybe (String, SrcLoc)

# Documentation

type HasCallStack = ?callStack :: CallStack #

Request a CallStack.

NOTE: The implicit parameter `?callStack :: CallStack` is an implementation detail and should not be considered part of the `CallStack` API, we may decide to change the implementation in the future.

@since base-4.9.0.0

type CallStack = [(String, SrcLoc)] #

data SrcLoc #

A single location in the source code.

@since base-4.8.1.0

Constructors

SrcLoc |
Fields srcLocPackage :: [Char] srcLocModule :: [Char] srcLocFile :: [Char] srcLocStartLine :: Int srcLocStartCol :: Int srcLocEndLine :: Int srcLocEndCol :: Int

#### Instances

Instances details

Eq SrcLoc | @since base-4.9.0.0
Instance details Defined in GHC.Internal.Stack.Types Methods (==) :: SrcLoc -> SrcLoc -> Bool # (/=) :: SrcLoc -> SrcLoc -> Bool #

callStack :: HasCallStack => CallStack #

callSite :: HasCallStack => Maybe (String, SrcLoc) #