fused-effects-1.0.0.0: A fast, flexible, fused effect system.

Safe HaskellNone
LanguageHaskell2010

Control.Carrier.Trace.Printing

Contents

Description

A carrier for the Trace effect that prints all traced results to stderr.

Since: 1.0.0.0

Synopsis

Trace carrier

runTrace :: TraceC m a -> m a Source #

Run a Trace effect, printing traces to stderr.

runTrace (trace s) = liftIO (putStrLn s)
runTrace (pure a) = pure a

Since: 1.0.0.0

newtype TraceC m a Source #

Since: 1.0.0.0

Constructors

TraceC (m a) 
Instances
MonadTrans TraceC Source # 
Instance details

Defined in Control.Carrier.Trace.Printing

Methods

lift :: Monad m => m a -> TraceC m a #

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

Defined in Control.Carrier.Trace.Printing

Methods

(>>=) :: TraceC m a -> (a -> TraceC m b) -> TraceC m b #

(>>) :: TraceC m a -> TraceC m b -> TraceC m b #

return :: a -> TraceC m a #

fail :: String -> TraceC m a #

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

Defined in Control.Carrier.Trace.Printing

Methods

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

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

MonadFix m => MonadFix (TraceC m) Source # 
Instance details

Defined in Control.Carrier.Trace.Printing

Methods

mfix :: (a -> TraceC m a) -> TraceC m a #

MonadFail m => MonadFail (TraceC m) Source # 
Instance details

Defined in Control.Carrier.Trace.Printing

Methods

fail :: String -> TraceC m a #

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

Defined in Control.Carrier.Trace.Printing

Methods

pure :: a -> TraceC m a #

(<*>) :: TraceC m (a -> b) -> TraceC m a -> TraceC m b #

liftA2 :: (a -> b -> c) -> TraceC m a -> TraceC m b -> TraceC m c #

(*>) :: TraceC m a -> TraceC m b -> TraceC m b #

(<*) :: TraceC m a -> TraceC m b -> TraceC m a #

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

Defined in Control.Carrier.Trace.Printing

Methods

liftIO :: IO a -> TraceC m a #

Alternative m => Alternative (TraceC m) Source # 
Instance details

Defined in Control.Carrier.Trace.Printing

Methods

empty :: TraceC m a #

(<|>) :: TraceC m a -> TraceC m a -> TraceC m a #

some :: TraceC m a -> TraceC m [a] #

many :: TraceC m a -> TraceC m [a] #

MonadPlus m => MonadPlus (TraceC m) Source # 
Instance details

Defined in Control.Carrier.Trace.Printing

Methods

mzero :: TraceC m a #

mplus :: TraceC m a -> TraceC m a -> TraceC m a #

(MonadIO m, Algebra sig m) => Algebra (Trace :+: sig) (TraceC m) Source # 
Instance details

Defined in Control.Carrier.Trace.Printing

Methods

alg :: (Trace :+: sig) (TraceC m) a -> TraceC m a Source #

Trace effect