diff options
Diffstat (limited to 'cryptonite-backport/Crypto/Internal/DeepSeq.hs')
-rw-r--r-- | cryptonite-backport/Crypto/Internal/DeepSeq.hs | 33 |
1 files changed, 0 insertions, 33 deletions
diff --git a/cryptonite-backport/Crypto/Internal/DeepSeq.hs b/cryptonite-backport/Crypto/Internal/DeepSeq.hs deleted file mode 100644 index 9da79881..00000000 --- a/cryptonite-backport/Crypto/Internal/DeepSeq.hs +++ /dev/null | |||
@@ -1,33 +0,0 @@ | |||
1 | -- | | ||
2 | -- Module : Crypto.Internal.DeepSeq | ||
3 | -- License : BSD-style | ||
4 | -- Maintainer : Vincent Hanquez <vincent@snarc.org> | ||
5 | -- Stability : experimental | ||
6 | -- Portability : unknown | ||
7 | -- | ||
8 | -- Simple abstraction module to allow compilation without deepseq | ||
9 | -- by defining our own NFData class if not compiling with deepseq | ||
10 | -- support. | ||
11 | -- | ||
12 | {-# LANGUAGE CPP #-} | ||
13 | module Crypto.Internal.DeepSeq | ||
14 | ( NFData(..) | ||
15 | ) where | ||
16 | |||
17 | #ifdef WITH_DEEPSEQ_SUPPORT | ||
18 | import Control.DeepSeq | ||
19 | #else | ||
20 | import Data.Word | ||
21 | import Data.ByteArray | ||
22 | |||
23 | class NFData a where rnf :: a -> () | ||
24 | |||
25 | instance NFData Word8 where rnf w = w `seq` () | ||
26 | instance NFData Word16 where rnf w = w `seq` () | ||
27 | instance NFData Word32 where rnf w = w `seq` () | ||
28 | instance NFData Word64 where rnf w = w `seq` () | ||
29 | |||
30 | instance NFData Bytes where rnf b = b `seq` () | ||
31 | instance NFData ScrubbedBytes where rnf b = b `seq` () | ||
32 | |||
33 | #endif | ||