debuggable-0.1.0: Utilities for making your applications more debuggable.
Safe HaskellNone
LanguageHaskell2010

Debug.Provenance.Scope

Description

Utilities for tracking scope: nested Invocations

Intended for unqualified import.

Synopsis

Thread-local scope

type Scope = [Invocation] Source #

Thread-local scope

Most recent invocations are first in the list.

scoped :: (HasCallStack, MonadMask m, MonadIO m) => m a -> m a Source #

Extend current scope

getScope :: MonadIO m => m Scope Source #

Get current scope

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