io-classes 1.9.0.0 → 1.10.0.0
raw patch · 5 files changed
+22/−6 lines, 5 filesdep ~base
Dependency ranges changed: base
Files
- CHANGELOG.md +4/−1
- io-classes.cabal +1/−1
- io-classes/Control/Monad/Class/MonadEventlog.hs +8/−2
- io-classes/Control/Monad/Class/MonadThrow.hs +1/−1
- mtl/Control/Monad/Class/MonadEventlog/Trans.hs +8/−1
CHANGELOG.md view
@@ -1,8 +1,11 @@ # Revsion history of io-classes -## next release+## 1.10.0.0 ### Breaking changes++* Added `flushEventLog` to `MonadEventLog` class.+* Added `Monad` constraint to `MonadEventlog` class. ### Non-breaking changes
io-classes.cabal view
@@ -1,6 +1,6 @@ cabal-version: 3.4 name: io-classes-version: 1.9.0.0+version: 1.10.0.0 synopsis: Type classes for concurrency with STM, ST and timing description: IO Monad class hierarchy compatible with:
io-classes/Control/Monad/Class/MonadEventlog.hs view
@@ -2,7 +2,7 @@ import Control.Monad.Reader -import Debug.Trace qualified as IO (traceEventIO, traceMarkerIO)+import Debug.Trace qualified as IO class Monad m => MonadEventlog m where @@ -17,13 +17,18 @@ -- profiling tools to help you keep clear which marker is which. traceMarkerIO :: String -> m () + -- | Immediately flush the event log, if enabled.+ --+ flushEventLog :: m ()+ -- -- Instances for IO -- instance MonadEventlog IO where- traceEventIO = IO.traceEventIO+ traceEventIO = IO.traceEventIO traceMarkerIO = IO.traceMarkerIO+ flushEventLog = IO.flushEventLog -- -- Instance for ReaderT@@ -32,3 +37,4 @@ instance MonadEventlog m => MonadEventlog (ReaderT r m) where traceEventIO = lift . traceEventIO traceMarkerIO = lift . traceMarkerIO+ flushEventLog = lift flushEventLog
io-classes/Control/Monad/Class/MonadThrow.hs view
@@ -210,7 +210,7 @@ -- | Monads which can 'evaluate'. ---class MonadEvaluate m where+class Monad m => MonadEvaluate m where evaluate :: a -> m a --
mtl/Control/Monad/Class/MonadEventlog/Trans.hs view
@@ -18,39 +18,46 @@ instance MonadEventlog m => MonadEventlog (ContT r m) where traceEventIO = lift . traceEventIO traceMarkerIO = lift . traceMarkerIO+ flushEventLog = lift flushEventLog -- | @since 0.1.0.0 instance MonadEventlog m => MonadEventlog (ExceptT e m) where traceEventIO = lift . traceEventIO traceMarkerIO = lift . traceMarkerIO+ flushEventLog = lift flushEventLog -- | @since 0.1.0.0 instance (Monoid w, MonadEventlog m) => MonadEventlog (Lazy.RWST r w s m) where traceEventIO = lift . traceEventIO traceMarkerIO = lift . traceMarkerIO+ flushEventLog = lift flushEventLog -- | @since 0.1.0.0 instance (Monoid w, MonadEventlog m) => MonadEventlog (Strict.RWST r w s m) where traceEventIO = lift . traceEventIO traceMarkerIO = lift . traceMarkerIO+ flushEventLog = lift flushEventLog -- | @since 0.1.0.0 instance MonadEventlog m => MonadEventlog (Lazy.StateT s m) where traceEventIO = lift . traceEventIO traceMarkerIO = lift . traceMarkerIO+ flushEventLog = lift flushEventLog -- | @since 0.1.0.0 instance MonadEventlog m => MonadEventlog (Strict.StateT s m) where traceEventIO = lift . traceEventIO traceMarkerIO = lift . traceMarkerIO+ flushEventLog = lift flushEventLog -- | @since 0.1.0.0 instance (Monoid w, MonadEventlog m) => MonadEventlog (Lazy.WriterT w m) where traceEventIO = lift . traceEventIO traceMarkerIO = lift . traceMarkerIO+ flushEventLog = lift flushEventLog -- | @since 0.1.0.0 instance (Monoid w, MonadEventlog m) => MonadEventlog (Strict.WriterT w m) where traceEventIO = lift . traceEventIO traceMarkerIO = lift . traceMarkerIO-+ flushEventLog = lift flushEventLog