@@ -65,7 +65,7 @@ module Control.Distributed.Process.Internal.Types
6565
6666import Data.Map (Map)
6767import Data.Int (Int32)
68−import Data.Typeable (Typeable)
68+import Data.Typeable (Typeable, TypeRep)
6969import Data.Binary (Binary(put, get), putWord8, getWord8)
7070import Data.ByteString.Lazy (ByteString)
7171import Data.Accessor (Accessor, accessor)
@@ -243,12 +243,12 @@ data RemoteTable = RemoteTable {
243243 -- of type @ByteString -> b@ (basically, @f . encode@)
244244 _remoteTableLabels :: Map String Dynamic
245245 -- | Runtime counterpart to SerializableDict
246− , _remoteTableDicts :: Map String RuntimeSerializableSupport
246+ , _remoteTableDicts :: Map TypeRep RuntimeSerializableSupport
247247 }
248248
249249-- | Reification of 'Serializable' (see "Control.Distributed.Process.Closure")
250250data SerializableDict a where
251− SerializableDict :: Serializable a => String -> SerializableDict a
251+ SerializableDict :: Serializable a => SerializableDict a
252252 deriving (Typeable)
253253
254254-- | Runtime support for implementing "polymorphic" functions with a
@@ -497,13 +497,13 @@ typedChannelWithId cid = typedChannels >>> DAC.mapMaybe cid
497497remoteTableLabels :: Accessor RemoteTable (Map String Dynamic)
498498remoteTableLabels = accessor _remoteTableLabels (\ls tbl -> tbl { _remoteTableLabels = ls })
499499
500−remoteTableDicts :: Accessor RemoteTable (Map String RuntimeSerializableSupport)
500+remoteTableDicts :: Accessor RemoteTable (Map TypeRep RuntimeSerializableSupport)
501501remoteTableDicts = accessor _remoteTableDicts (\ds tbl -> tbl { _remoteTableDicts = ds })
502502
503503remoteTableLabel :: String -> Accessor RemoteTable (Maybe Dynamic)
504504remoteTableLabel label = remoteTableLabels >>> DAC.mapMaybe label
505505
506−remoteTableDict :: String -> Accessor RemoteTable (Maybe RuntimeSerializableSupport)
506+remoteTableDict :: TypeRep -> Accessor RemoteTable (Maybe RuntimeSerializableSupport)
507507remoteTableDict label = remoteTableDicts >>> DAC.mapMaybe label
508508
509509--------------------------------------------------------------------------------