packages feed

hashmap 1.2.0.1 → 1.3.0.0

raw patch · 4 files changed

+24/−2 lines, 4 filesdep +deepseqdep ~containersPVP ok

version bump matches the API change (PVP)

Dependencies added: deepseq

Dependency ranges changed: containers

API changes (from Hackage documentation)

+ Data.HashMap: instance (NFData k, NFData v) => NFData (Map k v)
+ Data.HashMap: instance (NFData k, NFData v) => NFData (Some k v)
+ Data.HashSet: instance NFData a => NFData (Set a)
+ Data.HashSet: instance NFData a => NFData (Some a)

Files

CHANGES view
@@ -1,4 +1,9 @@+= Version 1.3.0.0, 2012-12-11 =+^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^+* Add NFData instances.+ = Version 1.2.0.1, 2011-09-21 =+^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ * Add missing StandaloneDeriving and DeriveDataTypeable GHC extensions to enable Typeable deriving. Also remove PatternGuards extension, which was needed only once.
Data/HashMap.hs view
@@ -117,6 +117,7 @@ import Prelude hiding (lookup,map,filter,null)  import Control.Applicative (Applicative(pure,(<*>)))+import Control.DeepSeq import Data.Hashable import Data.Foldable (Foldable(foldMap)) import Data.List (foldl')@@ -156,6 +157,10 @@  data Some k v = Only !k v | More !(M.Map k v) deriving (Eq, Ord) +instance (NFData k, NFData v) => NFData (Some k v) where+  rnf (Only k v) = rnf k `seq` rnf v+  rnf (More m) = rnf m+ -- | The abstract type of a @Map@. Its interface is a suitable -- subset of 'Data.IntMap.IntMap'. newtype Map k v = Map (I.IntMap (Some k v)) deriving (Eq, Ord)@@ -164,6 +169,9 @@ -- It is deprecated and will be removed in furture releases. {-# DEPRECATED HashMap "HashMap is deprecated. Please use Map instead." #-} type HashMap k v = Map k v++instance (NFData k, NFData v) => NFData (Map k v) where+  rnf (Map m) = rnf m  instance Functor (Map k) where   fmap = map
Data/HashSet.hs view
@@ -69,6 +69,7 @@  import Prelude hiding (lookup,map,filter,null) +import Control.DeepSeq import Data.Hashable import Data.List (foldl') import Data.Monoid (Monoid(..))@@ -98,6 +99,10 @@  data Some a = Only !a | More !(S.Set a) deriving (Eq, Ord) +instance NFData a => NFData (Some a) where+  rnf (Only a) = rnf a+  rnf (More s) = rnf s+ -- | The abstract type of a @Set@. Its interface is a suitable -- subset of 'Data.IntSet.IntSet'. newtype Set a = Set (I.IntMap (Some a)) deriving (Eq, Ord)@@ -106,6 +111,9 @@ -- It is deprecated and will be removed in furture releases. {-# DEPRECATED HashSet "HashSet is deprecated. Please use Set instead." #-} type HashSet a = Set a++instance NFData a => NFData (Set a) where+  rnf (Set s) = rnf s  instance Ord a => Monoid (Set a) where   mempty  = empty
hashmap.cabal view
@@ -1,5 +1,5 @@ Name:                hashmap-Version:             1.2.0.1+Version:             1.3.0.0 Synopsis:            Persistent containers Map and Set based on hashing. Description:         An implementation of persistent 'Map' and 'Set' containers                      based on hashing. The implementation is build on@@ -32,7 +32,8 @@   Exposed-modules:   Data.HashMap, Data.HashSet    Build-depends:     base >= 4.0 && < 5,-                     containers >= 0.3,+                     containers >= 0.4.2,+                     deepseq >= 1.2,                      hashable >= 1.0    Extensions:        CPP