module Control.Monad.Class.MonadEventlog (MonadEventlog (..)) where
import Control.Monad.Reader
import Debug.Trace qualified as IO (traceEventIO, traceMarkerIO)
class Monad m => MonadEventlog m where
traceEventIO :: String -> m ()
traceMarkerIO :: String -> m ()
instance MonadEventlog IO where
traceEventIO :: String -> IO ()
traceEventIO = String -> IO ()
IO.traceEventIO
traceMarkerIO :: String -> IO ()
traceMarkerIO = String -> IO ()
IO.traceMarkerIO
instance MonadEventlog m => MonadEventlog (ReaderT r m) where
traceEventIO :: String -> ReaderT r m ()
traceEventIO = m () -> ReaderT r m ()
forall (m :: * -> *) a. Monad m => m a -> ReaderT r m a
forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift (m () -> ReaderT r m ())
-> (String -> m ()) -> String -> ReaderT r m ()
forall b c a. (b -> c) -> (a -> b) -> a -> c
. String -> m ()
forall (m :: * -> *). MonadEventlog m => String -> m ()
traceEventIO
traceMarkerIO :: String -> ReaderT r m ()
traceMarkerIO = m () -> ReaderT r m ()
forall (m :: * -> *) a. Monad m => m a -> ReaderT r m a
forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift (m () -> ReaderT r m ())
-> (String -> m ()) -> String -> ReaderT r m ()
forall b c a. (b -> c) -> (a -> b) -> a -> c
. String -> m ()
forall (m :: * -> *). MonadEventlog m => String -> m ()
traceMarkerIO