From 122dd424891f6c9be15ff5225886484386dd0956 Mon Sep 17 00:00:00 2001 From: "Laurent P. René de Cotret" Date: Thu, 15 Apr 2021 15:51:38 -0400 Subject: Remove dependency on cryptonite and memory (#843) --- test.hs | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'test.hs') diff --git a/test.hs b/test.hs index 8b3a2de..aea447c 100644 --- a/test.hs +++ b/test.hs @@ -1,9 +1,9 @@ {-# LANGUAGE BangPatterns #-} import Control.Monad (forM) -import qualified Crypto.Hash.SHA256 as SHA256 import qualified Data.ByteString.Base16 as Base16 import qualified Data.ByteString.Char8 as BS8 import qualified Data.ByteString.Lazy as BSL +import qualified Data.Hashable as DH import Data.Map (Map) import qualified Data.Map as Map import Hakyll @@ -20,9 +20,7 @@ mkFileHashes dir = do return (fromFilePath path1, h) where hash :: FilePath -> IO String - hash fp = do - !h <- SHA256.hashlazy <$> BSL.readFile fp - return $! BS8.unpack $! Base16.encode h + hash fp = (show . DH.hash) <$> BSL.readFile fp main :: IO () main = hakyll $ do -- cgit v1.2.3