| Safe Haskell | None |
|---|---|
| Language | Haskell2010 |
Debug.Provenance.Scope
Description
Utilities for tracking scope: nested Invocations
Intended for unqualified import.
Synopsis
- type Scope = [Invocation]
- scoped :: (HasCallStack, MonadMask m, MonadIO m) => m a -> m a
- getScope :: MonadIO m => m Scope
- forkInheritScope :: IO () -> IO ThreadId
- inheritScope :: MonadIO m => ThreadId -> m ()
- type HasCallStack = ?callStack :: CallStack
Thread-local scope
type Scope = [Invocation] Source #
Thread-local scope
Most recent invocations are first in the list.
Scope across threads
forkInheritScope :: IO () -> IO ThreadId Source #
Convenience combination of forkIO and inheritScope
inheritScope :: MonadIO m => ThreadId -> m () Source #
Inherit scope from a parent thread
This sets the scope of the current thread to that of the parent. This should
be done prior to growing the scope of the child thread; inheritScope will
fail with an exception if the scope in the child thread is not empty.
See also forkInheritScope.
Convenience re-exports
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