From f861a52b1b0707d5fec9d576cb32337046abb7c5 Mon Sep 17 00:00:00 2001 From: Vincent Hanquez Date: Thu, 30 Nov 2017 12:08:08 +0000 Subject: [PATCH] remove dependency on foundation and moving to basement --- Crypto/Error/Types.hs | 2 +- Crypto/Hash/Types.hs | 8 ++++---- cryptonite.cabal | 2 +- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/Crypto/Error/Types.hs b/Crypto/Error/Types.hs index 4b8a977..685e506 100644 --- a/Crypto/Error/Types.hs +++ b/Crypto/Error/Types.hs @@ -22,7 +22,7 @@ module Crypto.Error.Types import qualified Control.Exception as E import Data.Data -import Foundation.Monad (MonadFailure(..)) +import Basement.Monad (MonadFailure(..)) import Crypto.Internal.Imports -- | Enumeration of all possible errors that can be found in this library diff --git a/Crypto/Hash/Types.hs b/Crypto/Hash/Types.hs index ee594a1..7cc7e30 100644 --- a/Crypto/Hash/Types.hs +++ b/Crypto/Hash/Types.hs @@ -20,8 +20,8 @@ import Crypto.Internal.Imports import Crypto.Internal.ByteArray (ByteArrayAccess, Bytes) import qualified Crypto.Internal.ByteArray as B import Foreign.Ptr (Ptr) -import qualified Foundation.Array as F -import qualified Foundation as F +import Basement.UArray (UArray) +import Basement.NormalForm (deepseq) import GHC.TypeLits (Nat) -- | Class representing hashing algorithms. @@ -70,11 +70,11 @@ newtype Context a = Context Bytes -- -- Creating a digest from a bytearray is also possible with function -- 'Crypto.Hash.digestFromByteString'. -newtype Digest a = Digest (F.UArray Word8) +newtype Digest a = Digest (UArray Word8) deriving (Eq,Ord,ByteArrayAccess) instance NFData (Digest a) where - rnf (Digest u) = u `F.deepseq` () + rnf (Digest u) = u `deepseq` () instance Show (Digest a) where show (Digest bs) = map (toEnum . fromIntegral) diff --git a/cryptonite.cabal b/cryptonite.cabal index c85f26f..12a7893 100644 --- a/cryptonite.cabal +++ b/cryptonite.cabal @@ -227,7 +227,7 @@ Library Build-depends: base >= 4.6 && < 5 , bytestring , memory >= 0.14.5 - , foundation >= 0.0.8 + , basement , ghc-prim ghc-options: -Wall -fwarn-tabs -optc-O3 -fno-warn-unused-imports if os(linux)