Skip to content
Browse files

fix deprecated use of unsafePerformIO from Foreign.

  • Loading branch information...
1 parent 20378b5 commit f0614e84bf834f1d2c6aaf3ef56703ab51f61e13 @vincenthz committed Apr 19, 2012
View
6 Crypto/Hash/MD2.hs
@@ -24,13 +24,17 @@ module Crypto.Hash.MD2
) where
import Prelude hiding (init)
-import Foreign
+import System.IO.Unsafe (unsafePerformIO)
import Foreign.C.String
+import Foreign.Ptr
+import Foreign.Storable
+import Foreign.Marshal.Alloc
import qualified Data.ByteString as B
import qualified Data.ByteString.Lazy as L
import Data.ByteString (ByteString)
import Data.ByteString.Unsafe (unsafeUseAsCString, unsafeUseAsCStringLen)
import Data.ByteString.Internal (create, memcpy)
+import Data.Word
#ifdef HAVE_CRYPTOAPI
View
6 Crypto/Hash/MD4.hs
@@ -24,13 +24,17 @@ module Crypto.Hash.MD4
) where
import Prelude hiding (init)
-import Foreign
+import System.IO.Unsafe (unsafePerformIO)
import Foreign.C.String
+import Foreign.Ptr
+import Foreign.Storable
+import Foreign.Marshal.Alloc
import qualified Data.ByteString as B
import qualified Data.ByteString.Lazy as L
import Data.ByteString (ByteString)
import Data.ByteString.Unsafe (unsafeUseAsCString, unsafeUseAsCStringLen)
import Data.ByteString.Internal (create, memcpy)
+import Data.Word
#ifdef HAVE_CRYPTOAPI
View
6 Crypto/Hash/MD5.hs
@@ -24,13 +24,17 @@ module Crypto.Hash.MD5
) where
import Prelude hiding (init)
-import Foreign
+import System.IO.Unsafe (unsafePerformIO)
import Foreign.C.String
+import Foreign.Ptr
+import Foreign.Storable
+import Foreign.Marshal.Alloc
import qualified Data.ByteString as B
import qualified Data.ByteString.Lazy as L
import Data.ByteString (ByteString)
import Data.ByteString.Unsafe (unsafeUseAsCString, unsafeUseAsCStringLen)
import Data.ByteString.Internal (create, memcpy)
+import Data.Word
#ifdef HAVE_CRYPTOAPI
View
6 Crypto/Hash/RIPEMD160.hs
@@ -24,13 +24,17 @@ module Crypto.Hash.RIPEMD160
) where
import Prelude hiding (init)
-import Foreign
+import System.IO.Unsafe (unsafePerformIO)
import Foreign.C.String
+import Foreign.Ptr
+import Foreign.Storable
+import Foreign.Marshal.Alloc
import qualified Data.ByteString as B
import qualified Data.ByteString.Lazy as L
import Data.ByteString (ByteString)
import Data.ByteString.Unsafe (unsafeUseAsCString, unsafeUseAsCStringLen)
import Data.ByteString.Internal (create, memcpy)
+import Data.Word
#ifdef HAVE_CRYPTOAPI
View
6 Crypto/Hash/SHA1.hs
@@ -24,13 +24,17 @@ module Crypto.Hash.SHA1
) where
import Prelude hiding (init)
-import Foreign
+import System.IO.Unsafe (unsafePerformIO)
import Foreign.C.String
+import Foreign.Ptr
+import Foreign.Storable
+import Foreign.Marshal.Alloc
import qualified Data.ByteString as B
import qualified Data.ByteString.Lazy as L
import Data.ByteString (ByteString)
import Data.ByteString.Unsafe (unsafeUseAsCString, unsafeUseAsCStringLen)
import Data.ByteString.Internal (create, memcpy)
+import Data.Word
#ifdef HAVE_CRYPTOAPI
View
6 Crypto/Hash/SHA224.hs
@@ -24,13 +24,17 @@ module Crypto.Hash.SHA224
) where
import Prelude hiding (init)
-import Foreign
+import System.IO.Unsafe (unsafePerformIO)
import Foreign.C.String
+import Foreign.Ptr
+import Foreign.Storable
+import Foreign.Marshal.Alloc
import qualified Data.ByteString as B
import qualified Data.ByteString.Lazy as L
import Data.ByteString (ByteString)
import Data.ByteString.Unsafe (unsafeUseAsCString, unsafeUseAsCStringLen)
import Data.ByteString.Internal (create, memcpy)
+import Data.Word
#ifdef HAVE_CRYPTOAPI
View
6 Crypto/Hash/SHA256.hs
@@ -24,13 +24,17 @@ module Crypto.Hash.SHA256
) where
import Prelude hiding (init)
-import Foreign
+import System.IO.Unsafe (unsafePerformIO)
import Foreign.C.String
+import Foreign.Ptr
+import Foreign.Storable
+import Foreign.Marshal.Alloc
import qualified Data.ByteString as B
import qualified Data.ByteString.Lazy as L
import Data.ByteString (ByteString)
import Data.ByteString.Unsafe (unsafeUseAsCString, unsafeUseAsCStringLen)
import Data.ByteString.Internal (create, memcpy)
+import Data.Word
#ifdef HAVE_CRYPTOAPI
View
6 Crypto/Hash/SHA384.hs
@@ -24,13 +24,17 @@ module Crypto.Hash.SHA384
) where
import Prelude hiding (init)
-import Foreign
+import System.IO.Unsafe (unsafePerformIO)
import Foreign.C.String
+import Foreign.Ptr
+import Foreign.Storable
+import Foreign.Marshal.Alloc
import qualified Data.ByteString as B
import qualified Data.ByteString.Lazy as L
import Data.ByteString (ByteString)
import Data.ByteString.Unsafe (unsafeUseAsCString, unsafeUseAsCStringLen)
import Data.ByteString.Internal (create, memcpy)
+import Data.Word
#ifdef HAVE_CRYPTOAPI
View
6 Crypto/Hash/SHA512.hs
@@ -25,13 +25,17 @@ module Crypto.Hash.SHA512
) where
import Prelude hiding (init)
-import Foreign
+import System.IO.Unsafe (unsafePerformIO)
import Foreign.C.String
+import Foreign.Ptr
+import Foreign.Storable
+import Foreign.Marshal.Alloc
import qualified Data.ByteString as B
import qualified Data.ByteString.Lazy as L
import Data.ByteString (ByteString)
import Data.ByteString.Unsafe (unsafeUseAsCString, unsafeUseAsCStringLen)
import Data.ByteString.Internal (create, memcpy)
+import Data.Word
#ifdef HAVE_CRYPTOAPI
View
7 Crypto/Hash/Skein256.hs
@@ -24,14 +24,19 @@ module Crypto.Hash.Skein256
) where
import Prelude hiding (init)
-import Foreign
+import System.IO.Unsafe (unsafePerformIO)
import Foreign.C.String
import Foreign.C.Types
+import Foreign.Ptr
+import Foreign.Storable
+import Foreign.Marshal.Alloc
import qualified Data.ByteString as B
import qualified Data.ByteString.Lazy as L
import Data.ByteString (ByteString)
import Data.ByteString.Unsafe (unsafeUseAsCString, unsafeUseAsCStringLen)
import Data.ByteString.Internal (create, memcpy)
+import Data.Word
+import Data.Bits
#ifdef HAVE_CRYPTOAPI
View
7 Crypto/Hash/Skein512.hs
@@ -24,14 +24,19 @@ module Crypto.Hash.Skein512
) where
import Prelude hiding (init)
-import Foreign
+import System.IO.Unsafe (unsafePerformIO)
import Foreign.C.String
import Foreign.C.Types
+import Foreign.Ptr
+import Foreign.Storable
+import Foreign.Marshal.Alloc
import qualified Data.ByteString as B
import qualified Data.ByteString.Lazy as L
import Data.ByteString (ByteString)
import Data.ByteString.Unsafe (unsafeUseAsCString, unsafeUseAsCStringLen)
import Data.ByteString.Internal (create, memcpy)
+import Data.Word
+import Data.Bits
#ifdef HAVE_CRYPTOAPI
View
6 Crypto/Hash/Tiger.hs
@@ -24,13 +24,17 @@ module Crypto.Hash.Tiger
) where
import Prelude hiding (init)
-import Foreign
+import System.IO.Unsafe (unsafePerformIO)
import Foreign.C.String
+import Foreign.Ptr
+import Foreign.Storable
+import Foreign.Marshal.Alloc
import qualified Data.ByteString as B
import qualified Data.ByteString.Lazy as L
import Data.ByteString (ByteString)
import Data.ByteString.Unsafe (unsafeUseAsCString, unsafeUseAsCStringLen)
import Data.ByteString.Internal (create, memcpy)
+import Data.Word
#ifdef HAVE_CRYPTOAPI

0 comments on commit f0614e8

Please sign in to comment.
Something went wrong with that request. Please try again.