From eccbc118243385626e15a2512c9f67df22baa5c5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Olivier=20Ch=C3=A9ron?= Date: Fri, 26 Oct 2018 20:51:01 +0200 Subject: [PATCH] Remove Crypto.Internal.Proxy Data.Proxy can be used instead now that GHC >= 8.0. In Data.Proxy the Proxy type is poly-kinded. --- Crypto/ECC.hs | 2 +- Crypto/ECC/Simple/Prim.hs | 2 +- Crypto/Internal/Proxy.hs | 13 ------------- Crypto/Random/Entropy/Backend.hs | 2 +- cryptonite.cabal | 1 - 5 files changed, 3 insertions(+), 17 deletions(-) delete mode 100644 Crypto/Internal/Proxy.hs diff --git a/Crypto/ECC.hs b/Crypto/ECC.hs index 34a911f..8391b5a 100644 --- a/Crypto/ECC.hs +++ b/Crypto/ECC.hs @@ -31,7 +31,6 @@ import qualified Crypto.ECC.Simple.Types as Simple import qualified Crypto.ECC.Simple.Prim as Simple import Crypto.Random import Crypto.Error -import Crypto.Internal.Proxy import Crypto.Internal.Imports import Crypto.Internal.ByteArray (ByteArray, ByteArrayAccess, ScrubbedBytes) import qualified Crypto.Internal.ByteArray as B @@ -41,6 +40,7 @@ import qualified Crypto.PubKey.Curve448 as X448 import Data.ByteArray (convert) import Data.Data (Data()) import Data.Kind (Type) +import Data.Proxy -- | An elliptic curve key pair composed of the private part (a scalar), and -- the associated point. diff --git a/Crypto/ECC/Simple/Prim.hs b/Crypto/ECC/Simple/Prim.hs index 25d8fe1..48e94cb 100644 --- a/Crypto/ECC/Simple/Prim.hs +++ b/Crypto/ECC/Simple/Prim.hs @@ -17,7 +17,7 @@ module Crypto.ECC.Simple.Prim ) where import Data.Maybe -import Crypto.Internal.Proxy +import Data.Proxy import Crypto.Number.ModArithmetic import Crypto.Number.F2m import Crypto.Number.Generate (generateBetween) diff --git a/Crypto/Internal/Proxy.hs b/Crypto/Internal/Proxy.hs deleted file mode 100644 index 1873b2b..0000000 --- a/Crypto/Internal/Proxy.hs +++ /dev/null @@ -1,13 +0,0 @@ --- | --- Module : Crypto.Internal.Proxy --- License : BSD-style --- Maintainer : Vincent Hanquez --- Stability : experimental --- Portability : Good --- -module Crypto.Internal.Proxy - ( Proxy(..) - ) where - --- | A type witness for 'a' as phantom type -data Proxy a = Proxy diff --git a/Crypto/Random/Entropy/Backend.hs b/Crypto/Random/Entropy/Backend.hs index eb2a92e..ca2acc2 100644 --- a/Crypto/Random/Entropy/Backend.hs +++ b/Crypto/Random/Entropy/Backend.hs @@ -14,8 +14,8 @@ module Crypto.Random.Entropy.Backend ) where import Foreign.Ptr +import Data.Proxy import Data.Word (Word8) -import Crypto.Internal.Proxy import Crypto.Random.Entropy.Source #ifdef SUPPORT_RDRAND import Crypto.Random.Entropy.RDRand diff --git a/cryptonite.cabal b/cryptonite.cabal index 2c09c5c..35c8dc6 100644 --- a/cryptonite.cabal +++ b/cryptonite.cabal @@ -220,7 +220,6 @@ Library Crypto.PubKey.ElGamal Crypto.ECC.Simple.Types Crypto.ECC.Simple.Prim - Crypto.Internal.Proxy Crypto.Internal.ByteArray Crypto.Internal.Compat Crypto.Internal.CompatPrim