From f86b493e3244087c5ca0ba75af508345c5618ae7 Mon Sep 17 00:00:00 2001 From: Vincent Hanquez Date: Mon, 20 Apr 2015 06:02:12 +0100 Subject: [PATCH] remove warnings --- Crypto/Cipher/Types.hs | 4 +--- Crypto/Internal/Memory.hs | 1 - Crypto/Internal/WordArray.hs | 4 ++-- Crypto/PubKey/Ed25519.hs | 1 - 4 files changed, 3 insertions(+), 7 deletions(-) diff --git a/Crypto/Cipher/Types.hs b/Crypto/Cipher/Types.hs index d0cad63..3a0cde0 100644 --- a/Crypto/Cipher/Types.hs +++ b/Crypto/Cipher/Types.hs @@ -17,12 +17,10 @@ module Crypto.Cipher.Types , StreamCipher(..) , DataUnitOffset , KeySizeSpecifier(..) - , AEAD(..) - , AEADMode(..) - , AEADModeImpl(..) -- , cfb8Encrypt -- , cfb8Decrypt -- * AEAD functions + , AEADMode(..) , module Crypto.Cipher.Types.AEAD -- * Initial Vector type and constructor , IV diff --git a/Crypto/Internal/Memory.hs b/Crypto/Internal/Memory.hs index cb10e72..c049c39 100644 --- a/Crypto/Internal/Memory.hs +++ b/Crypto/Internal/Memory.hs @@ -27,7 +27,6 @@ import GHC.Types import GHC.Prim import GHC.Word import GHC.Ptr -import Data.Word (Word8) import Foreign.Marshal.Utils (copyBytes) import Data.SecureMem (SecureMem) import Crypto.Internal.CompatPrim diff --git a/Crypto/Internal/WordArray.hs b/Crypto/Internal/WordArray.hs index 4211b36..a8044e4 100644 --- a/Crypto/Internal/WordArray.hs +++ b/Crypto/Internal/WordArray.hs @@ -60,7 +60,7 @@ array32 (I# n) l = unsafeDoIO $ IO $ \s -> loop i st mb ((W32# x):xs) | booleanPrim (i ==# n) = freezeArray mb st | otherwise = - let st' = writeWord32Array# mb i x st + let !st' = writeWord32Array# mb i x st in loop (i +# 1#) st' mb xs freezeArray mb st = case unsafeFreezeByteArray# mb st of @@ -128,7 +128,7 @@ mutableArrayRead32 (MutableArray32 m) (I# o) = IO $ \s -> case readWord32Array# {-# INLINE mutableArrayRead32 #-} mutableArrayWrite32 :: MutableArray32 -> Int -> Word32 -> IO () -mutableArrayWrite32 (MutableArray32 m) (I# o) (W32# w) = IO $ \s -> let s' = writeWord32Array# m o w s in (# s', () #) +mutableArrayWrite32 (MutableArray32 m) (I# o) (W32# w) = IO $ \s -> let !s' = writeWord32Array# m o w s in (# s', () #) {-# INLINE mutableArrayWrite32 #-} mutableArrayWriteXor32 :: MutableArray32 -> Int -> Word32 -> IO () diff --git a/Crypto/PubKey/Ed25519.hs b/Crypto/PubKey/Ed25519.hs index 45651a3..d36432e 100644 --- a/Crypto/PubKey/Ed25519.hs +++ b/Crypto/PubKey/Ed25519.hs @@ -33,7 +33,6 @@ import Crypto.Internal.Imports import Crypto.Internal.Memory import Crypto.Internal.ByteArray import Crypto.Error -import Data.ByteString (ByteString) -- | An Ed25519 Secret key newtype SecretKey = SecretKey SecureBytes