dirty-haskell.org: An Update to the Type Level Utilities of an Overly Complicated Feedreader

It's not crazy — it's having fun with types.

I commited a change to beuteltier/Beuteltier/Types/Util.hs (“[…] Hashable update”). I replaced the Hashable instances for Object and MetaData with a single, better optimized function:

objHash :: Applicative f => ObjectGen f -> f Int
-- ^ Two 'ObjectGen's hashes are a first indication of whether they are 'Equivalent'
objHash o = fmap hash $ (,) <$> (Set.toList . (^. mTags) <$> o ^. oMeta) <*> (Map.keys <$> o ^. oContent)

The new implementation allows computation of hashes without calling generateObject (that function is evil — it makes sure the entire Object is “in RAM” (it isn´t actually, of course (because haskell is lazy)—but I have no guarantee of that)).