imm-1.2.1.0: Execute arbitrary actions for each unread element of RSS/Atom feeds

Safe HaskellNone
LanguageHaskell98

Imm.Logger

Contents

Description

DSL/interpreter model for the logger

Synopsis

Types

data LoggerF next Source #

Logger DSL

Constructors

Log LogLevel Doc next 
GetLevel (LogLevel -> next) 
SetLevel LogLevel next 
SetColorize Bool next 
Flush next 

Instances

Functor LoggerF Source # 

Methods

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

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

Monad m => PairingM (CoLoggerF m) LoggerF m Source # 

Methods

pairM :: (a -> b -> m r) -> CoLoggerF m a -> LoggerF b -> m r Source #

data CoLoggerF m a Source #

Logger interpreter

Constructors

CoLoggerF 

Fields

Instances

Functor m => Functor (CoLoggerF m) Source # 

Methods

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

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

Monad m => PairingM (CoLoggerF m) LoggerF m Source # 

Methods

pairM :: (a -> b -> m r) -> CoLoggerF m a -> LoggerF b -> m r Source #

Primitives

log :: (MonadFree f m, LoggerF :<: f) => LogLevel -> Doc -> m () Source #

flushLogs :: (MonadFree f m, LoggerF :<: f) => m () Source #

Helpers

logDebug :: (MonadFree f m, LoggerF :<: f) => Doc -> m () Source #

logInfo :: (MonadFree f m, LoggerF :<: f) => Doc -> m () Source #

logWarning :: (MonadFree f m, LoggerF :<: f) => Doc -> m () Source #

logError :: (MonadFree f m, LoggerF :<: f) => Doc -> m () Source #