diff options
author | Joey Hess <joeyh@joeyh.name> | 2017-05-08 16:03:40 -0400 |
---|---|---|
committer | Joey Hess <joeyh@joeyh.name> | 2017-05-08 16:03:40 -0400 |
commit | 947961f05250b20e7ff299427fb6cbc3b4341f71 (patch) | |
tree | b468f72a786b7c618211b4e2996a286cb0387043 /doc | |
parent | 9312e989c5eaeb82625234a14213adc77a60dd86 (diff) | |
parent | 0d178f087b6a0a5c761df7765d15544dcff948a1 (diff) | |
download | debug-me-947961f05250b20e7ff299427fb6cbc3b4341f71.tar.gz |
Merge branch 'master' of ssh://debug-me.branchable.com
Diffstat (limited to 'doc')
-rw-r--r-- | doc/protocol/comment_3_6338e14886f146eb5d2f9c9316e1f7de._comment | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/doc/protocol/comment_3_6338e14886f146eb5d2f9c9316e1f7de._comment b/doc/protocol/comment_3_6338e14886f146eb5d2f9c9316e1f7de._comment new file mode 100644 index 0000000..657a20a --- /dev/null +++ b/doc/protocol/comment_3_6338e14886f146eb5d2f9c9316e1f7de._comment @@ -0,0 +1,22 @@ +[[!comment format=mdwn + username="https://www.joachim-breitner.de/" + nickname="nomeata" + avatar="http://cdn.libravatar.org/avatar/a2112893817513537c6a2c228c04c138a2f68bba57121ab7f267de58fc5171d7" + subject="comment 3" + date="2017-05-07T03:20:38Z" + content=""" +Still not good, I think, as the instance `Hashable Hash` has `hash = id`, so + + hash Nothing + = hash () + = id (hash ()) + = hash (Just (hash ()) + + and we have a collision at type `Maybe Hash`. + +What would work is to do the same that `Hashable []` does, i.e. has the hash again: + + hash (Just v) = hash (val (hashValue v)) + hash Nothing = hash (mempty :: B.ByteString) + +"""]] |