di 1.2.1 → 1.2.2
raw patch · 3 files changed
+17/−11 lines, 3 filesPVP ok
version bump matches the API change (PVP)
API changes (from Hackage documentation)
+ Di: ask :: MonadDi level path msg m => m (Di level path msg)
Files
- CHANGELOG.md +5/−0
- di.cabal +1/−1
- lib/Di.hs +11/−10
CHANGELOG.md view
@@ -1,3 +1,8 @@+# Version 1.2.2++* Re-export `ask` from `Di.Df1.Monad`.++ # Version 1.2.1 * Improve logging of exceptions.
di.cabal view
@@ -1,5 +1,5 @@ name: di-version: 1.2.1+version: 1.2.2 author: Renzo Carbonara maintainer: renλren.zone copyright: Renzo Carbonara 2017
lib/Di.hs view
@@ -63,11 +63,7 @@ -- @ module Di ( new- , Di.Df1.Df1 - -- * Monadic API- , Di.Df1.Monad.MonadDf1- -- * Hierarchy , Di.Df1.Monad.push -- * Metadata@@ -94,11 +90,16 @@ -- * Exceptions , Di.Monad.throw - -- * Support for @DiT@- , Di.Df1.Monad.Df1T+ -- * Support for @MonadDi@ and @DiT@ , Di.Monad.runDiT , Di.Monad.hoistDiT+ , Di.Monad.ask + -- * Convenient type-synonyms+ , Di.Df1.Df1+ , Di.Df1.Monad.Df1T+ , Di.Df1.Monad.MonadDf1+ -- * Types from @Df1@ , Df1.Level , Df1.Path@@ -136,7 +137,7 @@ -- main = do -- -- First you obtain a 'Di.Core.Di'. -- -- You do this once per application, in `main`.--- new $ \\di -> do+-- 'new' $ \\di -> do -- -- You can start logging right away by acting -- -- on the on the 'Di.Core.Di' object, but here -- -- we encourage using 'Di.Monad.runDiT' and perforfing@@ -164,7 +165,7 @@ -- -- If you throw an exception with throw, -- -- it will be logged automatically together -- -- with its current scope. Isn't that nice?--- 'Di.Df1.Monad.throw' (userError "Oops!")+-- 'Di.Monad.throw' (userError "Oops!") -- @ -- -- That program will render something like this to 'System.IO.stderr':@@ -194,12 +195,12 @@ => (Di.Core.Di Df1.Level Df1.Path Df1.Message -> m a) -- ^ /This type is the same as @'Di.Df1.Df1' -> m a@./ --- -- ^ Within this scope, you can use the obtained 'Di.Core.Di' safely, even+ -- Within this scope, you can use the obtained 'Di.Core.Di' safely, even -- concurrently. As soon as @m a@ finishes, 'new' will block until -- all logs have finished processing, before returning. -- -- /WARNING:/ Even while @'new' commit 'pure' :: m ('Di.Core.Di' 'Df1.Level'- -- 'Df1.Path' 'Df1.Message')@ type-checks, attempting to use the obtained 'Di'+ -- 'Df1.Path' 'Df1.Message')@ type-checks, attempting to use the obtained 'Di.Core.Di' -- outside its intended scope will fail. -> m a -- ^ new act = do