diff options
author | Joey Hess <joeyh@joeyh.name> | 2017-04-14 19:39:23 -0400 |
---|---|---|
committer | Joey Hess <joeyh@joeyh.name> | 2017-04-14 19:39:23 -0400 |
commit | 74003096f8018827dde28b5746a19c1e325bc68f (patch) | |
tree | de5343b6dae38d4ae06b8ad004f45b9669b28cb6 /Hash.hs | |
parent | 0222ca35ec03836ab216aff1a38e337e2be16511 (diff) | |
download | debug-me-74003096f8018827dde28b5746a19c1e325bc68f.tar.gz |
add --graphviz mode
This commit was sponsored by Shane-o on Patreon.
Diffstat (limited to 'Hash.hs')
-rw-r--r-- | Hash.hs | 6 |
1 files changed, 3 insertions, 3 deletions
@@ -9,11 +9,11 @@ import qualified Data.ByteString.Char8 as C8 import qualified Crypto.Hash as H class Hashable a where - hash :: a -> HashPointer + hash :: a -> Hash instance Hashable B.ByteString where -- Encodes the SHA256 using base16 format - hash = HashPointer SHA256 . Val . C8.pack . show . sha256 + hash = Hash SHA256 . Val . C8.pack . show . sha256 instance Hashable Val where hash (Val v) = hash v @@ -22,7 +22,7 @@ sha256 :: B.ByteString -> H.Digest H.SHA256 sha256 = H.hash -- | Hash the concacenation of the hashes. -instance Hashable [HashPointer] where +instance Hashable [Hash] where hash = hash . B.concat . map (val . hashValue) instance Hashable a => Hashable (Activity a) where |