Safe Haskell | Safe-Inferred |
---|---|
Language | Haskell2010 |
Synopsis
- newtype Context = Context {}
- emptyContext :: Context
- lookupContext :: ContextKey a -> Context -> Maybe a
- insertContext :: ContextKey a -> a -> Context -> Context
- data ContextKey a = ContextKey {}
- contextKeyName :: ContextKey a -> Text
- unsafeNewContextKey :: forall m a. MonadIO m => Text -> m (ContextKey a)
- attachContextValueUsing :: forall m a b. (MonadIO m, MonadMask m) => ContextBackend a -> a -> m b -> m b
- getAttachedContextValueUsing :: forall m a. (MonadIO m, MonadThrow m) => ContextBackend a -> m (Maybe a)
- getAttachedContextUsing :: forall m a. (MonadIO m, MonadThrow m) => ContextBackend a -> m Context
- data ContextBackend a = ContextBackend {}
- unsafeNewContextBackend :: forall m a. (MonadIO m, Typeable a) => m (ContextBackend a)
- data SomeContextBackend where
- newtype ContextBackendRegistry = ContextBackendRegistry {}
- emptyContextBackendRegistry :: IO ContextBackendRegistry
- registerContextBackend :: Unique -> ContextBackend a -> ContextBackendRegistry -> IO ()
- defaultContextBackendRegistry :: ContextBackendRegistry
Disclaimer
In general, changes to this module will not be reflected in the library's version updates. Direct use of this module should be done with utmost care, otherwise invariants will easily be violated.
lookupContext :: ContextKey a -> Context -> Maybe a Source #
insertContext :: ContextKey a -> a -> Context -> Context Source #
data ContextKey a Source #
contextKeyName :: ContextKey a -> Text Source #
unsafeNewContextKey :: forall m a. MonadIO m => Text -> m (ContextKey a) Source #
attachContextValueUsing :: forall m a b. (MonadIO m, MonadMask m) => ContextBackend a -> a -> m b -> m b Source #
getAttachedContextValueUsing :: forall m a. (MonadIO m, MonadThrow m) => ContextBackend a -> m (Maybe a) Source #
getAttachedContextUsing :: forall m a. (MonadIO m, MonadThrow m) => ContextBackend a -> m Context Source #
data ContextBackend a Source #
unsafeNewContextBackend :: forall m a. (MonadIO m, Typeable a) => m (ContextBackend a) Source #
data SomeContextBackend where Source #
newtype ContextBackendRegistry Source #
registerContextBackend :: Unique -> ContextBackend a -> ContextBackendRegistry -> IO () Source #