From 74003096f8018827dde28b5746a19c1e325bc68f Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Fri, 14 Apr 2017 19:39:23 -0400 Subject: add --graphviz mode This commit was sponsored by Shane-o on Patreon. --- Hash.hs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'Hash.hs') diff --git a/Hash.hs b/Hash.hs index f2b8d75..53be540 100644 --- a/Hash.hs +++ b/Hash.hs @@ -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 -- cgit v1.2.3