rio-orphans-0.1.2.0: Orphan instances for the RIO type in the rio package

Safe Haskell | None
Language | Haskell2010

RIO.Orphans

Contents

- Orphan instances

Description

Orphan instances for the `RIO` data type.

Synopsis

- class HasResourceMap env where
  - resourceMapL :: Lens' env ResourceMap
- type ResourceMap = IORef ReleaseMap
- withResourceMap :: MonadUnliftIO m => (ResourceMap -> m a) -> m a

# Documentation

class HasResourceMap env where Source #

An environment with a `ResourceMap`

Since: 0.1.0.0

Methods

resourceMapL :: Lens' env ResourceMap Source #

#### Instances

Instances details

HasResourceMap (IORef ReleaseMap) Source # |
Instance details Defined in RIO.Orphans Methods resourceMapL :: Lens' (IORef ReleaseMap) ResourceMap Source #

type ResourceMap = IORef ReleaseMap Source #

A collection of all of the registered resource cleanup actions.

Since: 0.1.0.0

withResourceMap :: MonadUnliftIO m => (ResourceMap -> m a) -> m a Source #

Perform an action with a `ResourceMap`

Since: 0.1.0.0

# Orphan instances

Display LogStr Source # | Since: 0.1.1.0
Instance details Methods display :: LogStr -> Utf8Builder Source # textDisplay :: LogStr -> Text Source #
MonadBaseControl IO (RIO env) Source # | Since: 0.1.0.0
Instance details Methods liftBaseWith :: (RunInBase (RIO env) IO -> IO a) -> RIO env a Source # restoreM :: StM (RIO env) a -> RIO env a Source #
MonadBase IO (RIO env) Source # | Since: 0.1.0.0
Instance details Methods liftBase :: IO α -> RIO env α Source #
MonadCatch (RIO env) Source # | Since: 0.1.0.0
Instance details Methods catch :: (HasCallStack, Exception e) => RIO env a -> (e -> RIO env a) -> RIO env a Source #
MonadMask (RIO env) Source # | Since: 0.1.0.0
Instance details Methods mask :: HasCallStack => ((forall a. RIO env a -> RIO env a) -> RIO env b) -> RIO env b Source # uninterruptibleMask :: HasCallStack => ((forall a. RIO env a -> RIO env a) -> RIO env b) -> RIO env b Source # generalBracket :: HasCallStack => RIO env a -> (a -> ExitCase b -> RIO env c) -> (a -> RIO env b) -> RIO env (b, c) Source #
HasLogFunc env => MonadLogger (RIO env) Source # | Since: 0.1.1.0
Instance details Methods monadLoggerLog :: ToLogStr msg => Loc -> LogSource -> LogLevel -> msg -> RIO env () Source #
HasLogFunc env => MonadLoggerIO (RIO env) Source # | Do not let the generated function escape its RIO context. This may lead to log-related cleanup running before the function is called. Since: 0.1.2.0
Instance details Methods askLoggerIO :: RIO env (Loc -> LogSource -> LogLevel -> LogStr -> IO ()) Source #
HasResourceMap env => MonadResource (RIO env) Source # |
Instance details Methods liftResourceT :: ResourceT IO a -> RIO env a Source #