diff options
author | Joey Hess <joeyh@joeyh.name> | 2017-05-05 21:36:26 -0400 |
---|---|---|
committer | Joey Hess <joeyh@joeyh.name> | 2017-05-05 21:36:26 -0400 |
commit | 03c33aa0b4b775bace17c10bbfbd85da44a6f9a2 (patch) | |
tree | 938a0d690da487650d9fac574c7cda9be7801409 /Hash.hs | |
parent | 827ca2d5d2e2c5f5221f187f924dc5d9e99dbd37 (diff) | |
download | debug-me-03c33aa0b4b775bace17c10bbfbd85da44a6f9a2.tar.gz |
fix from nomeata's review
He pointed out that Just () and Nothing would hash the same.
Luckily Maybe Hash is the only Maybe type that needs to be hashed,
so specialize the instance.
Diffstat (limited to 'Hash.hs')
-rw-r--r-- | Hash.hs | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -84,7 +84,7 @@ instance Hashable [Hash] where hash = hash . B.concat . map (val . hashValue) -- | Hash empty string for Nothing -instance Hashable v => Hashable (Maybe v) where +instance Hashable (Maybe Hash) where hash Nothing = hash () hash (Just v) = hash v |