From 0ab1c41ac87b3a64d2270748d395706e6c5549e0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Olivier=20Ch=C3=A9ron?= Date: Sun, 14 Oct 2018 16:58:29 +0200 Subject: [PATCH] Add missing Data instances --- Crypto/Hash/SHAKE.hs | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/Crypto/Hash/SHAKE.hs b/Crypto/Hash/SHAKE.hs index 5d36228..4eed297 100644 --- a/Crypto/Hash/SHAKE.hs +++ b/Crypto/Hash/SHAKE.hs @@ -22,6 +22,7 @@ module Crypto.Hash.SHAKE import Crypto.Hash.Types import Foreign.Ptr (Ptr) +import Data.Data import Data.Typeable import Data.Word (Word8, Word32) @@ -37,7 +38,7 @@ import Crypto.Internal.Nat -- correlated (one being a prefix of the other). Results are unrelated to -- 'SHAKE256' results. data SHAKE128 (bitlen :: Nat) = SHAKE128 - deriving (Show, Typeable) + deriving (Show, Data, Typeable) instance (IsDivisibleBy8 bitlen, KnownNat bitlen) => HashAlgorithm (SHAKE128 bitlen) where type HashBlockSize (SHAKE128 bitlen) = 168 @@ -58,7 +59,7 @@ instance (IsDivisibleBy8 bitlen, KnownNat bitlen) => HashAlgorithm (SHAKE128 bit -- correlated (one being a prefix of the other). Results are unrelated to -- 'SHAKE128' results. data SHAKE256 (bitlen :: Nat) = SHAKE256 - deriving (Show, Typeable) + deriving (Show, Data, Typeable) instance (IsDivisibleBy8 bitlen, KnownNat bitlen) => HashAlgorithm (SHAKE256 bitlen) where type HashBlockSize (SHAKE256 bitlen) = 136