Skip to content

Allow binary 0.9 and GHC 8.2 #314

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Aug 30, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions distributed-process.cabal
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ flag old-locale

Library
Build-Depends: base >= 4.6 && < 5,
binary >= 0.6.3 && < 0.9,
binary >= 0.6.3 && < 0.10,
hashable >= 1.2.0.5 && < 1.3,
network-transport >= 0.4.1.0 && < 0.6,
stm >= 2.4 && < 2.5,
Expand Down Expand Up @@ -123,7 +123,7 @@ benchmark distributed-process-throughput
distributed-process,
network-transport-tcp >= 0.3 && < 0.7,
bytestring >= 0.9 && < 0.11,
binary >= 0.6.3 && < 0.9
binary >= 0.6.3 && < 0.10
Main-Is: benchmarks/Throughput.hs
ghc-options: -Wall

Expand All @@ -133,7 +133,7 @@ benchmark distributed-process-latency
distributed-process,
network-transport-tcp >= 0.3 && < 0.7,
bytestring >= 0.9 && < 0.11,
binary >= 0.6.3 && < 0.9
binary >= 0.6.3 && < 0.10
Main-Is: benchmarks/Latency.hs
ghc-options: -Wall

Expand All @@ -143,7 +143,7 @@ benchmark distributed-process-channels
distributed-process,
network-transport-tcp >= 0.3 && < 0.7,
bytestring >= 0.9 && < 0.11,
binary >= 0.6.3 && < 0.9
binary >= 0.6.3 && < 0.10
Main-Is: benchmarks/Channels.hs
ghc-options: -Wall

Expand All @@ -153,7 +153,7 @@ benchmark distributed-process-spawns
distributed-process,
network-transport-tcp >= 0.3 && < 0.7,
bytestring >= 0.9 && < 0.11,
binary >= 0.6.3 && < 0.9
binary >= 0.6.3 && < 0.10
Main-Is: benchmarks/Spawns.hs
ghc-options: -Wall

Expand All @@ -163,6 +163,6 @@ benchmark distributed-process-ring
distributed-process,
network-transport-tcp >= 0.3 && < 0.7,
bytestring >= 0.9 && < 0.11,
binary >= 0.6.3 && < 0.9
binary >= 0.6.3 && < 0.10
Main-Is: benchmarks/ProcessRing.hs
ghc-options: -Wall -threaded -O2 -rtsopts
13 changes: 10 additions & 3 deletions src/Control/Distributed/Process/Serializable.hs
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
{-# LANGUAGE DeriveDataTypeable #-}
{-# LANGUAGE UndecidableInstances #-}
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE ScopedTypeVariables #-}
{-# LANGUAGE GADTs #-}
{-# LANGUAGE CPP #-}
module Control.Distributed.Process.Serializable
Expand All @@ -17,7 +18,11 @@ module Control.Distributed.Process.Serializable

import Data.Binary (Binary)

#if MIN_VERSION_base(4,7,0)
#if MIN_VERSION_base(4,10,0)
import Data.Typeable (Typeable)
import Type.Reflection (typeRep)
import Type.Reflection.Unsafe (TypeRep, typeRepFingerprint)
#elif MIN_VERSION_base(4,7,0)
import Data.Typeable (Typeable)
import Data.Typeable.Internal (TypeRep(TypeRep), typeOf)
#else
Expand Down Expand Up @@ -70,8 +75,10 @@ sizeOfFingerprint :: Int
sizeOfFingerprint = sizeOf (undefined :: Fingerprint)

-- | The fingerprint of the typeRep of the argument
fingerprint :: Typeable a => a -> Fingerprint
#if MIN_VERSION_base(4,8,0)
fingerprint :: forall a. Typeable a => a -> Fingerprint
#if MIN_VERSION_base(4,10,0)
fingerprint _ = typeRepFingerprint (typeRep :: TypeRep a)
#elif MIN_VERSION_base(4,8,0)
fingerprint a = let TypeRep fp _ _ _ = typeOf a in fp
#else
fingerprint a = let TypeRep fp _ _ = typeOf a in fp
Expand Down