packages feed

monad-logger 0.3.11 → 0.3.11.1

raw patch · 4 files changed

+40/−2 lines, 4 filesdep ~basedep ~monad-control

Dependency ranges changed: base, monad-control

Files

ChangeLog.md view
@@ -1,3 +1,7 @@+## 0.3.11.1++Add support for monad-control 1.0 [#52](https://github.com/kazu-yamamoto/logger/pull/52)+ ## 0.3.11  Add missing `MonadState` and `MonadWriter` instances for `NoLoggingT` [#51](https://github.com/kazu-yamamoto/logger/pull/51)
Control/Monad/Logger.hs view
@@ -359,18 +359,32 @@     lift = NoLoggingT  instance MonadTransControl NoLoggingT where+#if MIN_VERSION_monad_control(1,0,0)+    type StT NoLoggingT a = a+    liftWith f = NoLoggingT $ f runNoLoggingT+    restoreT = NoLoggingT+#else     newtype StT NoLoggingT a = StIdent {unStIdent :: a}     liftWith f = NoLoggingT $ f $ \(NoLoggingT t) -> liftM StIdent t     restoreT = NoLoggingT . liftM unStIdent+#endif     {-# INLINE liftWith #-}     {-# INLINE restoreT #-}  instance MonadBaseControl b m => MonadBaseControl b (NoLoggingT m) where+#if MIN_VERSION_monad_control(1,0,0)+     type StM (NoLoggingT m) a = StM m a+     liftBaseWith f = NoLoggingT $+         liftBaseWith $ \runInBase ->+             f $ runInBase . runNoLoggingT+     restoreM = NoLoggingT . restoreM+#else      newtype StM (NoLoggingT m) a = StMT' (StM m a)      liftBaseWith f = NoLoggingT $          liftBaseWith $ \runInBase ->              f $ liftM StMT' . runInBase . (\(NoLoggingT r) -> r)      restoreM (StMT' base) = NoLoggingT $ restoreM base+#endif  instance Monad m => MonadLogger (NoLoggingT m) where     monadLoggerLog _ _ _ _ = return ()@@ -428,18 +442,32 @@     lift = LoggingT . const  instance MonadTransControl LoggingT where+#if MIN_VERSION_monad_control(1,0,0)+    type StT LoggingT a = a+    liftWith f = LoggingT $ \r -> f $ \(LoggingT t) -> t r+    restoreT = LoggingT . const+#else     newtype StT LoggingT a = StReader {unStReader :: a}     liftWith f = LoggingT $ \r -> f $ \(LoggingT t) -> liftM StReader $ t r     restoreT = LoggingT . const . liftM unStReader+#endif     {-# INLINE liftWith #-}     {-# INLINE restoreT #-}  instance MonadBaseControl b m => MonadBaseControl b (LoggingT m) where+#if MIN_VERSION_monad_control(1,0,0)+     type StM (LoggingT m) a = StM m a+     liftBaseWith f = LoggingT $ \reader' ->+         liftBaseWith $ \runInBase ->+             f $ runInBase . (\(LoggingT r) -> r reader')+     restoreM = LoggingT . const . restoreM+#else      newtype StM (LoggingT m) a = StMT (StM m a)      liftBaseWith f = LoggingT $ \reader' ->          liftBaseWith $ \runInBase ->              f $ liftM StMT . runInBase . (\(LoggingT r) -> r reader')      restoreM (StMT base) = LoggingT $ const $ restoreM base+#endif  instance MonadIO m => MonadLogger (LoggingT m) where     monadLoggerLog a b c d = LoggingT $ \f -> liftIO $ f a b c (toLogStr d)
+ README.md view
@@ -0,0 +1,5 @@+## monad-logger++A monad transformer approach for logging.++This package provides Template Haskell functions for determining source code locations of messages.
monad-logger.cabal view
@@ -1,7 +1,7 @@ name:                monad-logger-version:             0.3.11+version:             0.3.11.1 synopsis:            A class of monads which can log messages.-description:         This package uses template-haskell for determining source code locations of messages.+description:         Hackage documentation generation is not reliable. For up to date documentation, please see: <http://www.stackage.org/package/monad-logger>. homepage:            https://github.com/kazu-yamamoto/logger license:             MIT license-file:        LICENSE@@ -11,6 +11,7 @@ build-type:          Simple cabal-version:       >=1.8 extra-source-files:  ChangeLog.md+                     README.md  flag template_haskell {       Description: Enable Template Haskell support