add PackageImports

This makes loading it in ghci work when both crypton and cryptonite are
installed.
This commit is contained in:
Joey Hess 2023-10-30 14:10:46 -04:00
parent bef1d68d13
commit ea2876ae77
No known key found for this signature in database
GPG key ID: DB12DB0FF05F8F38

View file

@ -6,6 +6,7 @@
-}
{-# LANGUAGE BangPatterns, PackageImports #-}
{-# LANGUAGE CPP #-}
module Utility.Hash (
sha1,
@ -76,8 +77,13 @@ import qualified Data.ByteString.Lazy as L
import qualified Data.Text as T
import qualified Data.Text.Encoding as T
import Data.IORef
import Crypto.MAC.HMAC hiding (Context)
import Crypto.Hash
#ifdef WITH_CRYPTON
import "crypton" Crypto.MAC.HMAC hiding (Context)
import "crypton" Crypto.Hash
#else
import "cryptonite" Crypto.MAC.HMAC hiding (Context)
import "cryptonite" Crypto.Hash
#endif
sha1 :: L.ByteString -> Digest SHA1
sha1 = hashlazy