expiring-cache-map 0.0.5.3 → 0.0.5.4
raw patch · 2 files changed
+18/−5 lines, 2 filesPVP: minor bump suggested
API additions: PVP suggests at least a minor version bump
API changes (from Hackage documentation)
+ Caching.ExpiringCacheMap.Utils.TestSequence: instance Applicative (TestSequence a)
+ Caching.ExpiringCacheMap.Utils.TestSequence: instance Functor (TestSequence a)
Files
Caching/ExpiringCacheMap/Utils/TestSequence.hs view
@@ -1,3 +1,5 @@+{-# LANGUAGE CPP #-} + -- | -- Module : Caching.ExpiringCacheMap.Utils.TestSequence -- Copyright: (c) 2014 Edward L. Blake @@ -77,6 +79,10 @@ TestSVar(..) ) where +#if (!defined(__GLASGOW_HASKELL__)) || (__GLASGOW_HASKELL__ < 710) +import Control.Applicative (Applicative(..)) +#endif +import Control.Monad (ap, liftM) import Data.Word (Word32) data TestSequenceEvents = @@ -107,7 +113,14 @@ newtype TestSVar a = TestSVar a --- TODO: Add instance to Applicative per GHC 7.10 warning +-- For GHC 7.10 +instance Functor (TestSequence a) where + fmap = liftM + +instance Applicative (TestSequence a) where + pure = return + (<*>) = ap + instance Monad (TestSequence a) where TestSequence fun >>= k = TestSequence
expiring-cache-map.cabal view
@@ -1,5 +1,5 @@ name: expiring-cache-map -version: 0.0.5.3 +version: 0.0.5.4 synopsis: General purpose simple caching. description: A simple general purpose shared state cache map with automatic expiration @@ -34,7 +34,7 @@ build-depends: base == 4.*, containers >= 0.5.0.0, - hashable >= 1.0.1.1 && < 1.2, + hashable >= 1.0.1.1, unordered-containers >= 0.2.0.0 test-suite test-threads @@ -46,7 +46,7 @@ bytestring >= 0.10.0.0, time >= 1.0, containers >= 0.5.0.0, - hashable >= 1.0.1.1 && < 1.2, + hashable >= 1.0.1.1, unordered-containers >= 0.2.0.0 other-modules: TestHashECMWithThreads @@ -61,7 +61,7 @@ base, bytestring >= 0.10.0.0, containers >= 0.5.0.0, - hashable >= 1.0.1.1 && < 1.2, + hashable >= 1.0.1.1, unordered-containers >= 0.2.0.0 other-modules: TestECMWithTestSequenceCommon