summaryrefslogtreecommitdiff
path: root/provider/posts/beuteltier/3.md
diff options
context:
space:
mode:
authorGregor Kleen <gkleen@yggdrasil.li>2016-05-27 19:40:18 +0200
committerGregor Kleen <gkleen@yggdrasil.li>2016-05-27 19:40:18 +0200
commit5b063193f389ef472366e4355a683f1843f29733 (patch)
tree73f1f8cf6d3834983cb9233ba6cc5eea5907f324 /provider/posts/beuteltier/3.md
parentb884925f12aae6967752e85457d2fc8abd9bffe0 (diff)
downloaddirty-haskell.org-5b063193f389ef472366e4355a683f1843f29733.tar
dirty-haskell.org-5b063193f389ef472366e4355a683f1843f29733.tar.gz
dirty-haskell.org-5b063193f389ef472366e4355a683f1843f29733.tar.bz2
dirty-haskell.org-5b063193f389ef472366e4355a683f1843f29733.tar.xz
dirty-haskell.org-5b063193f389ef472366e4355a683f1843f29733.zip
structure
Diffstat (limited to 'provider/posts/beuteltier/3.md')
-rw-r--r--provider/posts/beuteltier/3.md19
1 files changed, 19 insertions, 0 deletions
diff --git a/provider/posts/beuteltier/3.md b/provider/posts/beuteltier/3.md
new file mode 100644
index 0000000..9b699c1
--- /dev/null
+++ b/provider/posts/beuteltier/3.md
@@ -0,0 +1,19 @@
1---
2title: An Update to the Type Level Utilities of an Overly Complicated Feedreader
3published: 2015-08-12
4tags: Beuteltier
5---
6
7I commited a change to `beuteltier/Beuteltier/Types/Util.hs` ("[…] Hashable update"). I
8replaced the `Hashable` instances for `Object` and `MetaData` with a single, better
9optimized function:
10
11~~~ {.haskell}
12objHash :: Applicative f => ObjectGen f -> f Int
13-- ^ Two 'ObjectGen's hashes are a first indication of whether they are 'Equivalent'
14objHash o = fmap hash $ (,) <$> (Set.toList . (^. mTags) <$> o ^. oMeta) <*> (Map.keys <$> o ^. oContent)
15~~~
16
17The new implementation allows computation of hashes without calling `generateObject` (that
18function is evil — it makes sure the entire `Object` is "in RAM" (it isn´t actually, of
19course (because haskell is lazy)—but I have no guarantee of that)).