fused-effects-logging-0.1.0.0: fused-effects-logging - a logging library for fused-effects
Safe HaskellSafe-Inferred
LanguageGHC2021

Control.Carrier.Logging.Generic

Description

generic, thread safe logging

Synopsis

Documentation

newtype GenericLoggingC m a Source #

Constructors

MkGenericLoggingC 

Fields

Instances

Instances details
MonadFail m => MonadFail (GenericLoggingC m) Source # 
Instance details

Defined in Control.Carrier.Logging.Generic

Methods

fail :: String -> GenericLoggingC m a #

MonadIO m => MonadIO (GenericLoggingC m) Source # 
Instance details

Defined in Control.Carrier.Logging.Generic

Methods

liftIO :: IO a -> GenericLoggingC m a #

Applicative m => Applicative (GenericLoggingC m) Source # 
Instance details

Defined in Control.Carrier.Logging.Generic

Functor m => Functor (GenericLoggingC m) Source # 
Instance details

Defined in Control.Carrier.Logging.Generic

Methods

fmap :: (a -> b) -> GenericLoggingC m a -> GenericLoggingC m b #

(<$) :: a -> GenericLoggingC m b -> GenericLoggingC m a #

Monad m => Monad (GenericLoggingC m) Source # 
Instance details

Defined in Control.Carrier.Logging.Generic

MonadUnliftIO m => MonadUnliftIO (GenericLoggingC m) Source # 
Instance details

Defined in Control.Carrier.Logging.Generic

Methods

withRunInIO :: ((forall a. GenericLoggingC m a -> IO a) -> IO b) -> GenericLoggingC m b #

(Algebra sig m, MonadIO m) => Algebra (Logging :+: sig) (GenericLoggingC m) Source # 
Instance details

Defined in Control.Carrier.Logging.Generic

Methods

alg :: forall ctx (n :: Type -> Type) a. Functor ctx => Handler ctx n (GenericLoggingC m) -> (Logging :+: sig) n a -> ctx () -> GenericLoggingC m (ctx a) #

runGenericLogging Source #

Arguments

:: MonadUnliftIO m 
=> (LogMsg -> m ())

what to do with a log message

-> GenericLoggingC m a

the action

-> m a 

runStdoutLogging :: MonadUnliftIO m => GenericLoggingC m a -> m a Source #

log to stdout, supports concurrency

runColourLogging :: MonadUnliftIO m => GenericLoggingC m a -> m a Source #

logs to stdout, supports concurrency, logs are printed in colours according to the severity