Safe Haskell | Safe-Inferred |
---|---|
Language | Haskell2010 |
Synopsis
- type WithCallStack a = HasCallStack => a
- data CallStack
- annotateCallStackIO :: WithCallStack (IO a -> IO a)
- withFrozenCallStack :: HasCallStack => (HasCallStack => a) -> a
- withLexicalCallStack :: (a -> WithCallStack (IO b)) -> WithCallStack (a -> IO b)
- callStack :: HasCallStack => CallStack
- prettyCallStack :: CallStack -> String
- parentSrcLocPrefix :: WithCallStack String
Documentation
type WithCallStack a = HasCallStack => a Source #
annotateCallStackIO :: WithCallStack (IO a -> IO a) Source #
This function is for when you *really* want to add a call
stack to raised IO, but you don't have a
Verbosity
so you can't use
annotateIO
. If you have a Verbosity
,
please use that function instead.
withFrozenCallStack :: HasCallStack => (HasCallStack => a) -> a #
withLexicalCallStack :: (a -> WithCallStack (IO b)) -> WithCallStack (a -> IO b) Source #
callStack :: HasCallStack => CallStack #
prettyCallStack :: CallStack -> String #
parentSrcLocPrefix :: WithCallStack String Source #
Give the *parent* of the person who invoked this;
so it's most suitable for being called from a utility function.
You probably want to call this using withFrozenCallStack
; otherwise
it's not very useful. We didn't implement this for base-4.8.1
because we cannot rely on freezing to have taken place.