packages feed

logging-effect 1.2.5 → 1.2.6

raw patch · 3 files changed

+19/−4 lines, 3 filesdep ~basePVP ok

version bump matches the API change (PVP)

Dependency ranges changed: base

API changes (from Hackage documentation)

+ Control.Monad.Log: instance GHC.Base.Applicative m => Data.Semigroup.Semigroup (Control.Monad.Log.Ap m)

Files

Changelog.md view
@@ -1,3 +1,11 @@+# 1.2.6++## Other Changes++* Increased upper bound of `base` and support GHC 8.4.++---+ # 1.2.5  ## Other Changes
logging-effect.cabal view
@@ -1,5 +1,5 @@ name: logging-effect-version: 1.2.5+version: 1.2.6 synopsis: A mtl-style monad transformer for general purpose & compositional logging homepage: https://github.com/ocharles/logging-effect license: BSD3@@ -13,7 +13,7 @@ library   exposed-modules:     Control.Monad.Log   other-extensions:    ViewPatterns, OverloadedStrings, GeneralizedNewtypeDeriving, FlexibleContexts, FlexibleInstances, MultiParamTypeClasses, FunctionalDependencies, PatternSynonyms-  build-depends:       base >=4.8 && <4.11+  build-depends:       base >=4.8 && <4.12                      , async >=2.0 && <2.3                      , transformers >=0.4 && <0.6                      , text >=1.2 && <1.3
src/Control/Monad/Log.hs view
@@ -91,7 +91,7 @@ import Control.Monad.Trans.Reader (ReaderT(..)) import Control.Monad.Trans.State.Strict (StateT(..)) import Control.Monad.Writer.Class (MonadWriter(..))-import Data.Monoid+import Data.Semigroup import Data.Time (UTCTime, getCurrentTime) #if !MIN_VERSION_base(4, 9, 0) import GHC.SrcLoc (SrcLoc, showSrcLoc)@@ -100,6 +100,7 @@ import GHC.Stack (SrcLoc, CallStack, getCallStack, prettySrcLoc) #endif import System.IO (Handle, hFlush)+import GHC.IO.Handle.FD (stdin, stdout, stderr) import qualified Data.Text.Lazy as LT import qualified Text.PrettyPrint.Leijen.Text as PP import qualified Data.List.NonEmpty as NEL@@ -399,11 +400,17 @@  newtype Ap m = Ap { runAp :: m () } +instance Applicative m => Semigroup (Ap m) where+  Ap l <> Ap r = Ap (l *> r)+  {-# INLINEABLE (<>) #-}+ instance Applicative m => Monoid (Ap m) where   mempty = Ap (pure ())   {-# INLINEABLE mempty #-}+#if !(MIN_VERSION_base(4,11,0))   Ap l `mappend` Ap r = Ap (l *> r)   {-# INLINEABLE mappend #-}+#endif  -- | The main instance of 'MonadLog', which replaces calls to 'logMessage' with calls to a 'Handler'. instance Monad m => MonadLog message (LoggingT message m) where@@ -571,7 +578,7 @@   MkPureLoggingT     (StateT (\s ->                do (a,l) <- m-                  return (a,s <> l)))+                  return (a,mappend s l))) {-# INLINEABLE mkPureLoggingT #-}  instance MonadTrans (PureLoggingT log) where