context-0.1.1.1: 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
Functor View Source # 
Instance details

Defined in Context.Internal

Methods

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

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

view :: View ctx -> IO 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 :: View ctx -> IO (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