diff options
author | Laurent P. René de Cotret <LaurentRDC@users.noreply.github.com> | 2021-04-15 15:51:38 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-04-15 22:51:38 +0300 |
commit | 122dd424891f6c9be15ff5225886484386dd0956 (patch) | |
tree | 83d65c31bdd3a63d0305c6210225aaf9f29ffba5 /test.hs | |
parent | af9e29b5456c105dc948bc46c93e989a650b5ed1 (diff) | |
download | hakyll-122dd424891f6c9be15ff5225886484386dd0956.tar.gz |
Remove dependency on cryptonite and memory (#843)
Diffstat (limited to 'test.hs')
-rw-r--r-- | test.hs | 6 |
1 files changed, 2 insertions, 4 deletions
@@ -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 |