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

Safe Haskell | Safe
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

# 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: 4.9.0.0

type CallStack = [(String, SrcLoc)] #

data SrcLoc :: * #

A single location in the source code.

Since: 4.8.1.0

Constructors

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

Instances

Eq SrcLoc |
Methods (==) :: SrcLoc -> SrcLoc -> Bool # (/=) :: SrcLoc -> SrcLoc -> Bool #

callStack :: HasCallStack => CallStack #