context-0.2.0.0: Thread-indexed, nested contexts
Safe HaskellNone
LanguageHaskell2010

Context.View

Synopsis

Documentation

data View ctx Source #

A View provides a read-only view into a Store. View trades the Store ability to register new context for the ability to arbitrarily transform context values locally to the View.

Since: 0.1.1.0

Instances

Instances details
Functor View Source # 
Instance details

Defined in Context.Internal

Methods

fmap :: (a -> b) -> View a -> View b #

(<$) :: a -> View b -> View a #

view :: (MonadIO m, MonadThrow m) => View ctx -> m ctx Source #

Provide the calling thread a view of its current context from the specified View. Throws a NotFoundException when the calling thread has no registered context.

Since: 0.1.1.0

viewMay :: MonadIO m => View ctx -> m (Maybe ctx) Source #

Provide the calling thread a view of its current context from the specified View, if present.

Since: 0.1.1.0

toView :: Store ctx -> View ctx Source #

Create a View from the provided Store.

Since: 0.1.1.0