typehash 1.3.0.0 → 1.4.0.0
raw patch · 2 files changed
+5/−4 lines, 2 filesdep +binary
Dependencies added: binary
Files
- src/Data/TypeHash.hs +3/−2
- typehash.cabal +2/−2
src/Data/TypeHash.hs view
@@ -1,4 +1,4 @@-{-# LANGUAGE ScopedTypeVariables, DeriveDataTypeable #-}+{-# LANGUAGE ScopedTypeVariables, DeriveDataTypeable, GeneralizedNewtypeDeriving #-} -- | Produce a /hash/ for a type that is unique for that type. -- The hash takes both actual type names and type structure into account. --@@ -20,6 +20,7 @@ import Data.Char(isAlpha) import Control.Monad.State import Data.Generics+import Data.Binary import Data.Digest.Pure.MD5(MD5Digest, md5) import Data.ByteString.Lazy(pack) @@ -35,7 +36,7 @@ -- | Type hash. newtype TypeHash = TypeHash String- deriving (Eq, Ord, Typeable, Data, Show, Read)+ deriving (Eq, Ord, Typeable, Data, Show, Read, Binary) -- | Turn the type of the value into a type hash. typeHash :: (Data a) => a -> TypeHash
typehash.cabal view
@@ -1,5 +1,5 @@ Name: typehash-Version: 1.3.0.0+Version: 1.4.0.0 License: BSD3 Author: Lennart Augustsson Maintainer: Lennart Augustsson@@ -11,5 +11,5 @@ The hash takes both actual type names and type structure into account. This is useful for checking the type of persisted values. Hs-Source-Dirs: src-Build-Depends: base < 4, mtl, bytestring, pureMD5+Build-Depends: base < 4, mtl, bytestring, pureMD5, binary Exposed-modules: Data.TypeHash