git.iko.soy/distributed-process
on master help sign in
Merge pull request #157 from AndrewRademacher/master

Added Data instance to ProcessId, LocalProcessId and NodeId. Thanks Andrew Rademacher

commit05616b484e65eb4668e114ef56bfa8c9c2855fa1 authorTim Watson <watson.timothy@gmail.com> dateTue 2 Dec 2014, 08:40 (12 years ago) parent7e58aa90fae299
1 file changed+4−3
src/Control/Distributed/Process/Internal/Types.hs+4−3
src/Control/Distributed/Process/Internal/Types.hs+4−3
@@ -86,6 +86,7 @@ module Control.Distributed.Process.Internal.Types
8686import System.Mem.Weak (Weak)
8787import Data.Map (Map)
8888import Data.Int (Int32)
89+import Data.Data (Data)
8990import Data.Typeable (Typeable, typeOf)
9091import Data.Binary (Binary(put, get), putWord8, getWord8, encode)
9192import qualified Data.ByteString as BSS (ByteString, concat, copy)
@@ -133,7 +134,7 @@ import GHC.Generics
133134
134135-- | Node identifier
135136newtype NodeId = NodeId { nodeAddress :: NT.EndPointAddress }
136− deriving (Eq, Ord, Typeable, Generic)
137+ deriving (Eq, Ord, Typeable, Data, Generic)
137138instance Binary NodeId where
138139instance NFData NodeId
139140instance Hashable NodeId where
@@ -146,7 +147,7 @@ data LocalProcessId = LocalProcessId
146147 { lpidUnique :: {-# UNPACK #-} !Int32
147148 , lpidCounter :: {-# UNPACK #-} !Int32
148149 }
149− deriving (Eq, Ord, Typeable, Generic, Show)
150+ deriving (Eq, Ord, Typeable, Data, Generic, Show)
150151
151152instance Hashable LocalProcessId where
152153
@@ -157,7 +158,7 @@ data ProcessId = ProcessId
157158 -- | Node-local identifier for the process
158159 , processLocalId :: {-# UNPACK #-} !LocalProcessId
159160 }
160− deriving (Eq, Ord, Typeable, Generic)
161+ deriving (Eq, Ord, Typeable, Data, Generic)
161162
162163instance Binary ProcessId where
163164instance NFData ProcessId where