Hello community,

here is the log from the commit of package ghc-monad-logger for 
openSUSE:Factory checked in at 2016-02-11 12:37:29
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/ghc-monad-logger (Old)
 and      /work/SRC/openSUSE:Factory/.ghc-monad-logger.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "ghc-monad-logger"

Changes:
--------
--- /work/SRC/openSUSE:Factory/ghc-monad-logger/ghc-monad-logger.changes        
2016-01-22 01:08:33.000000000 +0100
+++ /work/SRC/openSUSE:Factory/.ghc-monad-logger.new/ghc-monad-logger.changes   
2016-02-11 12:37:30.000000000 +0100
@@ -1,0 +2,7 @@
+Thu Feb  4 19:19:17 UTC 2016 - mimi...@gmail.com
+
+- update to 0.3.18
+* Added logTHShow and logDebugSH, logInfoSH, etc. Accepts an argument of 
+    Show a => a instead of just Text.
+
+-------------------------------------------------------------------

Old:
----
  monad-logger-0.3.17.tar.gz

New:
----
  monad-logger-0.3.18.tar.gz

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ ghc-monad-logger.spec ++++++
--- /var/tmp/diff_new_pack.jUVEgk/_old  2016-02-11 12:37:31.000000000 +0100
+++ /var/tmp/diff_new_pack.jUVEgk/_new  2016-02-11 12:37:31.000000000 +0100
@@ -19,7 +19,7 @@
 %global pkg_name monad-logger
 
 Name:           ghc-monad-logger
-Version:        0.3.17
+Version:        0.3.18
 Release:        0
 Summary:        A class of monads which can log messages
 License:        MIT

++++++ monad-logger-0.3.17.tar.gz -> monad-logger-0.3.18.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/monad-logger-0.3.17/ChangeLog.md 
new/monad-logger-0.3.18/ChangeLog.md
--- old/monad-logger-0.3.17/ChangeLog.md        2016-01-12 12:18:18.000000000 
+0100
+++ new/monad-logger-0.3.18/ChangeLog.md        2016-02-03 09:50:59.000000000 
+0100
@@ -1,3 +1,7 @@
+## 0.3.18
+
+* Added logTHShow and logDebugSH, logInfoSH, etc. Accepts an argument of `Show 
a => a` instead of just `Text`.
+
 ## 0.3.17
 
 * log to a chan [#74](https://github.com/kazu-yamamoto/logger/pull/74)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/monad-logger-0.3.17/Control/Monad/Logger.hs 
new/monad-logger-0.3.18/Control/Monad/Logger.hs
--- old/monad-logger-0.3.17/Control/Monad/Logger.hs     2016-01-12 
12:18:18.000000000 +0100
+++ new/monad-logger-0.3.18/Control/Monad/Logger.hs     2016-02-03 
09:50:59.000000000 +0100
@@ -48,6 +48,12 @@
     , logWarn
     , logError
     , logOther
+    -- * TH logging of showable values
+    , logDebugSH
+    , logInfoSH
+    , logWarnSH
+    , logErrorSH
+    , logOtherSH
     -- * TH logging with source
     , logDebugS
     , logInfoS
@@ -246,7 +252,16 @@
 #if WITH_TEMPLATE_HASKELL
 logTH :: LogLevel -> Q Exp
 logTH level =
-    [|monadLoggerLog $(qLocation >>= liftLoc) (pack "") $(lift level) . (id :: 
Text -> Text)|]
+    [|monadLoggerLog $(qLocation >>= liftLoc) (pack "") $(lift level)
+     . (id :: Text -> Text)|]
+
+-- | Generates a function that takes a 'LogLevel' and a 'Show a => a'.
+--
+-- @since 0.3.18
+logTHShow :: LogLevel -> Q Exp
+logTHShow level =
+    [|monadLoggerLog $(qLocation >>= liftLoc) (pack "") $(lift level)
+      . ((pack . show) :: Show a => a -> Text)|]
 
 -- | Generates a function that takes a 'Text' and logs a 'LevelDebug' message. 
Usage:
 --
@@ -270,6 +285,31 @@
 logOther :: Text -> Q Exp
 logOther = logTH . LevelOther
 
+
+-- | Generates a function that takes a 'Show a => a' and logs a 'LevelDebug' 
message. Usage:
+--
+-- > $(logDebugSH) (Just "This is a debug log message")
+--
+-- @since 0.3.18
+logDebugSH :: Q Exp
+logDebugSH = logTHShow LevelDebug
+
+-- | See 'logDebugSH'
+logInfoSH :: Q Exp
+logInfoSH = logTHShow LevelInfo
+-- | See 'logDebugSH'
+logWarnSH :: Q Exp
+logWarnSH = logTHShow LevelWarn
+-- | See 'logDebugSH'
+logErrorSH :: Q Exp
+logErrorSH = logTHShow LevelError
+
+-- | Generates a function that takes a 'Show a => a' and logs a 'LevelOther' 
message. Usage:
+--
+-- > $(logOtherSH "My new level") "This is a log message"
+logOtherSH :: Text -> Q Exp
+logOtherSH = logTHShow . LevelOther
+
 -- | Lift a location into an Exp.
 --
 -- Since 0.3.1
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/monad-logger-0.3.17/monad-logger.cabal 
new/monad-logger-0.3.18/monad-logger.cabal
--- old/monad-logger-0.3.17/monad-logger.cabal  2016-01-12 12:18:18.000000000 
+0100
+++ new/monad-logger-0.3.18/monad-logger.cabal  2016-02-03 09:50:59.000000000 
+0100
@@ -1,5 +1,5 @@
 name:                monad-logger
-version:             0.3.17
+version:             0.3.18
 synopsis:            A class of monads which can log 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


Reply via email to