@@ -2,7 +2,6 @@
2{-# LANGUAGE UndecidableInstances #-}
2{-# LANGUAGE UndecidableInstances #-}
3{-# LANGUAGE FlexibleInstances #-}
3{-# LANGUAGE FlexibleInstances #-}
4{-# LANGUAGE GADTs #-}
4{-# LANGUAGE GADTs #-}
6module Control.Distributed.Process.Serializable
5module Control.Distributed.Process.Serializable
7 ( Serializable
6 ( Serializable
8 , encodeFingerprint
7 , encodeFingerprint
@@ -17,13 +16,7 @@ module Control.Distributed.Process.Serializable
18import Data.Binary (Binary)
17import Data.Binary (Binary)
20−#if MIN_VERSION_base(4,7,0)
21−import Data.Typeable (Typeable)
19+import Data.Typeable (Typeable, typeRepFingerprint, typeOf)
22−import Data.Typeable.Internal (TypeRep(TypeRep), typeOf)
24−import Data.Typeable (Typeable(..))
25−import Data.Typeable.Internal (TypeRep(TypeRep))
28import Numeric (showHex)
21import Numeric (showHex)
29import Control.Exception (throw)
22import Control.Exception (throw)
@@ -71,11 +64,7 @@ sizeOfFingerprint = sizeOf (undefined :: Fingerprint)
72-- | The fingerprint of the typeRep of the argument
65-- | The fingerprint of the typeRep of the argument
73fingerprint :: Typeable a => a -> Fingerprint
66fingerprint :: Typeable a => a -> Fingerprint
74−#if MIN_VERSION_base(4,8,0)
67+fingerprint = typeRepFingerprint . typeOf
75−fingerprint a = let TypeRep fp _ _ _ = typeOf a in fp
77−fingerprint a = let TypeRep fp _ _ = typeOf a in fp
80-- | Show fingerprint (for debugging purposes)
69-- | Show fingerprint (for debugging purposes)
81showFingerprint :: Fingerprint -> ShowS
70showFingerprint :: Fingerprint -> ShowS