summaryrefslogtreecommitdiff
path: root/provider
diff options
context:
space:
mode:
Diffstat (limited to 'provider')
-rw-r--r--provider/posts/beuteltier-2.lhs6
1 files changed, 6 insertions, 0 deletions
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
53> import Data.Map (Map) 53> import Data.Map (Map)
54> import qualified Data.Map as Map 54> import qualified Data.Map as Map
55> 55>
56> import Data.Set (Set)
57> import qualified Data.Set as Set
58>
56> import Data.Hashable (Hashable(..), hashUsing) 59> import Data.Hashable (Hashable(..), hashUsing)
57> 60>
58> import Data.Monoid ((<>)) 61> import Data.Monoid ((<>))
@@ -150,6 +153,9 @@ all objects sharing a hash to determine true equivalency.
150> -- | Two 'Object's´ hashes are a first indication of whether they are 'Equivalent' 153> -- | Two 'Object's´ hashes are a first indication of whether they are 'Equivalent'
151> instance Hashable Object where 154> instance Hashable Object where
152> hashWithSalt = hashUsing $ \a -> (a ^. oMeta', Map.keys $ content a) 155> hashWithSalt = hashUsing $ \a -> (a ^. oMeta', Map.keys $ content a)
156>
157> instance Hashable MetaData where
158> hashWithSalt = hashUsing $ Set.toList . (^. mTags)
153> 159>
154> content :: Object -> Map SubObjectName (Maybe SubObject) 160> content :: Object -> Map SubObjectName (Maybe SubObject)
155> content obj = promised obj <> actual obj 161> content obj = promised obj <> actual obj