From fccf1d6ddac8066f9e1698318bc5be0765b678aa Mon Sep 17 00:00:00 2001 From: Gregor Kleen Date: Wed, 5 Aug 2015 22:50:03 +0200 Subject: Followed commit to beuteltier --- provider/posts/beuteltier-2.lhs | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'provider/posts') diff --git a/provider/posts/beuteltier-2.lhs b/provider/posts/beuteltier-2.lhs index c60ba71..4ffd75f 100644 --- a/provider/posts/beuteltier-2.lhs +++ b/provider/posts/beuteltier-2.lhs @@ -53,6 +53,9 @@ mostly of the canonical invocations of > import Data.Map (Map) > import qualified Data.Map as Map > +> import Data.Set (Set) +> import qualified Data.Set as Set +> > import Data.Hashable (Hashable(..), hashUsing) > > import Data.Monoid ((<>)) @@ -150,6 +153,9 @@ all objects sharing a hash to determine true equivalency. > -- | Two 'Object's´ hashes are a first indication of whether they are 'Equivalent' > instance Hashable Object where > hashWithSalt = hashUsing $ \a -> (a ^. oMeta', Map.keys $ content a) +> +> instance Hashable MetaData where +> hashWithSalt = hashUsing $ Set.toList . (^. mTags) > > content :: Object -> Map SubObjectName (Maybe SubObject) > content obj = promised obj <> actual obj -- cgit v1.2.3