File: comment_1_44d3ac18bf10c1644a73855c01868ab3._comment

package info (click to toggle)
debug-me 1.20181208-2
  • links: PTS, VCS
  • area: main
  • in suites: buster
  • size: 680 kB
  • sloc: haskell: 3,134; sh: 115; makefile: 80
file content (19 lines) | stat: -rw-r--r-- 733 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
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.
"""]]