monad-logger 0.3.39 → 0.3.40
raw patch · 3 files changed
+17/−4 lines, 3 files
Files
- ChangeLog.md +5/−0
- Control/Monad/Logger.hs +10/−2
- monad-logger.cabal +2/−2
ChangeLog.md view
@@ -1,5 +1,10 @@ # ChangeLog for monad-logger +## 0.3.40++* Relax `fast-logger` upper bound from 3.2 to 3.3+* Add `Alternative` instances for `LoggingT` and `NoLoggingT`+ ## 0.3.39 * Make the previous change backwards compatible with CPP
Control/Monad/Logger.hs view
@@ -113,7 +113,7 @@ import Data.Functor ((<$>)) import Data.Monoid (Monoid) -import Control.Applicative (Applicative (..), WrappedMonad(..))+import Control.Applicative (Alternative (..), Applicative (..), WrappedMonad(..)) import Control.Concurrent.Chan (Chan(),writeChan,readChan) import Control.Concurrent.STM import Control.Concurrent.STM.TBChan@@ -389,7 +389,10 @@ -- -- @since 0.2.4 newtype NoLoggingT m a = NoLoggingT { runNoLoggingT :: m a }- deriving (Functor, Applicative, Monad, MonadIO, MonadThrow, MonadCatch, MonadMask, MonadActive, MonadBase b)+ deriving (+ Functor, Applicative, Monad, MonadIO, MonadThrow, MonadCatch, MonadMask, MonadActive, MonadBase b+ , Alternative -- ^ @since 0.3.40+ ) -- For some reason GND is a fool on GHC 7.10 and older, we have to help it by providing the context explicitly. deriving instance MonadResource m => MonadResource (NoLoggingT m)@@ -597,6 +600,11 @@ <*> (runLoggingT loggerA) loggerFn {-# INLINE (<*>) #-} #endif++-- | @since 0.3.40+instance (Alternative m) => Alternative (LoggingT m) where+ empty = LoggingT (const empty)+ LoggingT x <|> LoggingT y = LoggingT (\f -> x f <|> y f) #if MIN_VERSION_base(4, 9, 0) -- | @since 0.3.30
monad-logger.cabal view
@@ -5,7 +5,7 @@ -- see: https://github.com/sol/hpack name: monad-logger-version: 0.3.39+version: 0.3.40 synopsis: A class of monads which can log messages. description: See README and Haddocks at <https://www.stackage.org/package/monad-logger> category: System@@ -40,7 +40,7 @@ , conduit >=1.0 && <1.4 , conduit-extra >=1.1 && <1.4 , exceptions >=0.6 && <0.11- , fast-logger >=2.1 && <3.2+ , fast-logger >=2.1 && <3.3 , lifted-base , monad-control >=1.0 , monad-loops