git.iko.soy/distributed-process
on master help sign in
Fix build errors with ghc-8.2.1.
commit38745de6c30eb0463ffe5a375ed0fea7da85fcda authorFacundo Domínguez <facundo.dominguez@tweag.io> dateThu 31 Aug 2017, 21:01 (9 years ago) parenteca7a01
1 file changed+2−13
src/Control/Distributed/Process/Serializable.hs+2−13
src/Control/Distributed/Process/Serializable.hs+2−13
@@ -2,7 +2,6 @@
22{-# LANGUAGE UndecidableInstances #-}
33{-# LANGUAGE FlexibleInstances #-}
44{-# LANGUAGE GADTs #-}
5−{-# LANGUAGE CPP #-}
65module Control.Distributed.Process.Serializable
76 ( Serializable
87 , encodeFingerprint
@@ -17,13 +16,7 @@ module Control.Distributed.Process.Serializable
1716
1817import Data.Binary (Binary)
1918
20−#if MIN_VERSION_base(4,7,0)
21−import Data.Typeable (Typeable)
22−import Data.Typeable.Internal (TypeRep(TypeRep), typeOf)
23−#else
24−import Data.Typeable (Typeable(..))
25−import Data.Typeable.Internal (TypeRep(TypeRep))
26−#endif
19+import Data.Typeable (Typeable, typeRepFingerprint, typeOf)
2720
2821import Numeric (showHex)
2922import Control.Exception (throw)
@@ -71,11 +64,7 @@ sizeOfFingerprint = sizeOf (undefined :: Fingerprint)
7164
7265-- | The fingerprint of the typeRep of the argument
7366fingerprint :: Typeable a => a -> Fingerprint
74−#if MIN_VERSION_base(4,8,0)
75−fingerprint a = let TypeRep fp _ _ _ = typeOf a in fp
76−#else
77−fingerprint a = let TypeRep fp _ _ = typeOf a in fp
78−#endif
67+fingerprint = typeRepFingerprint . typeOf
7968
8069-- | Show fingerprint (for debugging purposes)
8170showFingerprint :: Fingerprint -> ShowS