packages feed

intern 0.2.0 → 0.2.2

raw patch · 3 files changed

+8/−1 lines, 3 filesPVP ok

version bump matches the API change (PVP)

API changes (from Hackage documentation)

+ Data.Interned: cacheSize :: Cache t -> IO Int
+ Data.Interned.Internal: cacheSize :: Cache t -> IO Int

Files

Data/Interned.hs view
@@ -3,6 +3,7 @@   , Uninternable(..)   , mkCache   , Cache+  , cacheSize   , Id(..)   , intern   ) where
Data/Interned/Internal.hs view
@@ -9,6 +9,7 @@   , mkCache   , Cache(..)   , CacheState(..)+  , cacheSize   , Id(..)   , intern   ) where@@ -25,6 +26,11 @@    !(HashMap (Description t) (Weak t))  newtype Cache t = Cache { getCache :: MVar (CacheState t) }++cacheSize :: Cache t -> IO Int+cacheSize (Cache t) = do+  CacheState i m <- readMVar t+  return (HashMap.size m)  mkCache :: Cache t mkCache = Cache $ unsafePerformIO $ newMVar $ CacheState 0 HashMap.empty
intern.cabal view
@@ -1,6 +1,6 @@ name:          intern category:      Data, Data Structures-version:       0.2.0+version:       0.2.2 license:       BSD3 cabal-version: >= 1.6 license-file:  LICENSE