summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorhttps://www.joachim-breitner.de/ <nomeata@web>2017-05-05 23:51:14 +0000
committeradmin <admin@branchable.com>2017-05-05 23:51:14 +0000
commit827ca2d5d2e2c5f5221f187f924dc5d9e99dbd37 (patch)
treea6584de64bf6da64d20e6e9a21e597dfebb44308
parent946969051069cd89b5e93746ead1b7e6a90270c5 (diff)
downloaddebug-me-827ca2d5d2e2c5f5221f187f924dc5d9e99dbd37.tar.gz
Added a comment: Code smell in hashing
-rw-r--r--doc/protocol/comment_1_44d3ac18bf10c1644a73855c01868ab3._comment19
1 files changed, 19 insertions, 0 deletions
diff --git a/doc/protocol/comment_1_44d3ac18bf10c1644a73855c01868ab3._comment b/doc/protocol/comment_1_44d3ac18bf10c1644a73855c01868ab3._comment
new file mode 100644
index 0000000..64eed07
--- /dev/null
+++ b/doc/protocol/comment_1_44d3ac18bf10c1644a73855c01868ab3._comment
@@ -0,0 +1,19 @@
+[[!comment format=mdwn
+ username="https://www.joachim-breitner.de/"
+ nickname="nomeata"
+ avatar="http://cdn.libravatar.org/avatar/a2112893817513537c6a2c228c04c138a2f68bba57121ab7f267de58fc5171d7"
+ subject="Code smell in hashing"
+ date="2017-05-05T23:51:14Z"
+ content="""
+Hi Joey,
+
+I looked through http://source.debug-me.branchable.com/?p=source.git;a=blob;f=Hash.hs;hb=HEAD and since this probably scurity-relevant, allow me to be nitpicky:
+
+```
+instance Hashable v => Hashable (Maybe v) where
+ hash Nothing = hash ()
+ hash (Just v) = hash v
+```
+
+will hash the distinct values `Just ()` and `Nothing` identically. Maybe you don't have any `Maybe ()` type around, but in that case you should maybe document that requirement.
+"""]]