packages feed

ekg-core 0.1.1.2 → 0.1.1.3

raw patch · 3 files changed

+10/−7 lines, 3 filesdep ~basePVP ok

version bump matches the API change (PVP)

Dependency ranges changed: base

API changes (from Hackage documentation)

Files

CHANGES.md view
@@ -1,3 +1,7 @@+## 0.1.1.3 (2017-10-10)++ * Fix a space leak in `System.Metric.Label.set` ([#21](https://github.com/tibbe/ekg-core/pull/21)).+ ## 0.1.1.2 (2017-07-31)   * GHC 8.2 support.
System/Metrics/Label.hs view
@@ -12,7 +12,7 @@     , modify     ) where -import Data.IORef (IORef, atomicModifyIORef, newIORef, readIORef)+import Data.IORef (IORef, atomicModifyIORef', atomicWriteIORef, newIORef, readIORef) import qualified Data.Text as T import Prelude hiding (read) @@ -29,11 +29,9 @@  -- | Set the label to the given value. set :: Label -> T.Text -> IO ()-set (C ref) !i = atomicModifyIORef ref $ \ _ -> (i, ())+set (C ref) !i = atomicWriteIORef ref i  -- | Set the label to the result of applying the given function to the -- value. modify :: (T.Text -> T.Text) -> Label -> IO ()-modify f (C ref) = do-    !_ <- atomicModifyIORef ref $ \ i -> let i' = f i in (i', i')-    return ()+modify f (C ref) = atomicModifyIORef' ref $ \i -> (f i, ())
ekg-core.cabal view
@@ -1,5 +1,5 @@ name:                ekg-core-version:             0.1.1.2+version:             0.1.1.3 synopsis:            Tracking of system metrics description:   This library lets you defined and track system metrics.@@ -8,7 +8,8 @@ license:             BSD3 license-file:        LICENSE author:              Johan Tibell-maintainer:          johan.tibell@gmail.com+maintainer:          Johan Tibell <johan.tibell@gmail.com>,+                     Mikhail Glushenkov <mikhail.glushenkov@gmail.com> category:            System build-type:          Simple extra-source-files:  CHANGES.md