diff options
| author | Gregor Kleen <gkleen@yggdrasil.li> | 2015-08-05 22:50:03 +0200 |
|---|---|---|
| committer | Gregor Kleen <gkleen@yggdrasil.li> | 2015-08-05 22:50:03 +0200 |
| commit | fccf1d6ddac8066f9e1698318bc5be0765b678aa (patch) | |
| tree | b230e024eec8aae0039eea6ce3d08a59060ce8f8 | |
| parent | 31755220d5a4b00ddf780bd6122512254cbb18f8 (diff) | |
| download | dirty-haskell.org-fccf1d6ddac8066f9e1698318bc5be0765b678aa.tar dirty-haskell.org-fccf1d6ddac8066f9e1698318bc5be0765b678aa.tar.gz dirty-haskell.org-fccf1d6ddac8066f9e1698318bc5be0765b678aa.tar.bz2 dirty-haskell.org-fccf1d6ddac8066f9e1698318bc5be0765b678aa.tar.xz dirty-haskell.org-fccf1d6ddac8066f9e1698318bc5be0765b678aa.zip | |
Followed commit to beuteltier
| -rw-r--r-- | provider/posts/beuteltier-2.lhs | 6 |
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 |
