purescript-0.10.7: PureScript Programming Language Compiler

Safe HaskellSafe
LanguageHaskell98

Control.Monad.Logger

Description

A replacement for WriterT IO which uses mutable references.

Synopsis

Documentation

newtype Logger w a Source #

A replacement for WriterT IO which uses mutable references.

Constructors

Logger 

Fields

Instances

Monoid w => MonadBaseControl IO (Logger w) Source # 

Associated Types

type StM (Logger w :: * -> *) a :: * #

Methods

liftBaseWith :: (RunInBase (Logger w) IO -> IO a) -> Logger w a #

restoreM :: StM (Logger w) a -> Logger w a #

Monoid w => MonadWriter w (Logger w) Source # 

Methods

writer :: (a, w) -> Logger w a #

tell :: w -> Logger w () #

listen :: Logger w a -> Logger w (a, w) #

pass :: Logger w (a, w -> w) -> Logger w a #

Monoid w => MonadBase IO (Logger w) Source # 

Methods

liftBase :: IO α -> Logger w α #

Monoid w => Monad (Logger w) Source # 

Methods

(>>=) :: Logger w a -> (a -> Logger w b) -> Logger w b #

(>>) :: Logger w a -> Logger w b -> Logger w b #

return :: a -> Logger w a #

fail :: String -> Logger w a #

Functor (Logger w) Source # 

Methods

fmap :: (a -> b) -> Logger w a -> Logger w b #

(<$) :: a -> Logger w b -> Logger w a #

Monoid w => Applicative (Logger w) Source # 

Methods

pure :: a -> Logger w a #

(<*>) :: Logger w (a -> b) -> Logger w a -> Logger w b #

(*>) :: Logger w a -> Logger w b -> Logger w b #

(<*) :: Logger w a -> Logger w b -> Logger w a #

Monoid w => MonadIO (Logger w) Source # 

Methods

liftIO :: IO a -> Logger w a #

type StM (Logger w) a Source # 
type StM (Logger w) a = a

runLogger' :: Monoid w => Logger w a -> IO (a, w) Source #

Run a Logger computation, starting with an empty log.