diff --git a/gen/template/hash-len.hs b/gen/template/hash-len.hs index 2d8bc9d..ecdd591 100644 --- a/gen/template/hash-len.hs +++ b/gen/template/hash-len.hs @@ -9,18 +9,20 @@ -- %%MODULENAME%% cryptographic hash. -- {-# LANGUAGE ForeignFunctionInterface #-} +{-# LANGUAGE DeriveDataTypeable #-} module Crypto.Hash.%%MODULENAME%% ( %{CUSTOMIZABLE%}%%COMMA%% %%MODULENAME%%_%%CUSTOM_BITSIZE%% (..)%{CUSTOMIZABLE%} ) where import Crypto.Hash.Types import Foreign.Ptr (Ptr) +import Data.Typeable import Data.Word (Word8, Word32) %{CUSTOMIZABLE%} -- | %%MODULENAME%% (%%CUSTOM_BITSIZE%% bits) cryptographic hash algorithm data %%MODULENAME%%_%%CUSTOM_BITSIZE%% = %%MODULENAME%%_%%CUSTOM_BITSIZE%% - deriving (Show) + deriving (Show,Typeable) instance HashAlgorithm %%MODULENAME%%_%%CUSTOM_BITSIZE%% where hashBlockSize _ = %%CUSTOM_BLOCK_SIZE_BYTES%% diff --git a/gen/template/hash.hs b/gen/template/hash.hs index 0ab2eae..673a11d 100644 --- a/gen/template/hash.hs +++ b/gen/template/hash.hs @@ -9,15 +9,17 @@ -- %%MODULENAME%% cryptographic hash. -- {-# LANGUAGE ForeignFunctionInterface #-} +{-# LANGUAGE DeriveDataTypeable #-} module Crypto.Hash.%%MODULENAME%% ( %%MODULENAME%% (..) ) where import Crypto.Hash.Types import Foreign.Ptr (Ptr) +import Data.Typeable import Data.Word (Word8, Word32) -- | %%MODULENAME%% cryptographic hash algorithm data %%MODULENAME%% = %%MODULENAME%% - deriving (Show) + deriving (Show,Typeable) instance HashAlgorithm %%MODULENAME%% where hashBlockSize _ = %%BLOCK_SIZE_BYTES%%