@@ -65,7 +65,7 @@ module Control.Distributed.Process.Internal.Types
66import Data.Map (Map)
66import Data.Map (Map)
67import Data.Int (Int32)
67import Data.Int (Int32)
68−import Data.Typeable (Typeable)
68+import Data.Typeable (Typeable, TypeRep)
69import Data.Binary (Binary(put, get), putWord8, getWord8)
69import Data.Binary (Binary(put, get), putWord8, getWord8)
70import Data.ByteString.Lazy (ByteString)
70import Data.ByteString.Lazy (ByteString)
71import Data.Accessor (Accessor, accessor)
71import Data.Accessor (Accessor, accessor)
@@ -243,12 +243,12 @@ data RemoteTable = RemoteTable {
243 -- of type @ByteString -> b@ (basically, @f . encode@)
243 -- of type @ByteString -> b@ (basically, @f . encode@)
244 _remoteTableLabels :: Map String Dynamic
244 _remoteTableLabels :: Map String Dynamic
245 -- | Runtime counterpart to SerializableDict
245 -- | Runtime counterpart to SerializableDict
246− , _remoteTableDicts :: Map String RuntimeSerializableSupport
246+ , _remoteTableDicts :: Map TypeRep RuntimeSerializableSupport
249-- | Reification of 'Serializable' (see "Control.Distributed.Process.Closure")
249-- | Reification of 'Serializable' (see "Control.Distributed.Process.Closure")
250data SerializableDict a where
250data SerializableDict a where
251− SerializableDict :: Serializable a => String -> SerializableDict a
251+ SerializableDict :: Serializable a => SerializableDict a
252 deriving (Typeable)
252 deriving (Typeable)
254-- | Runtime support for implementing "polymorphic" functions with a
254-- | Runtime support for implementing "polymorphic" functions with a
@@ -497,13 +497,13 @@ typedChannelWithId cid = typedChannels >>> DAC.mapMaybe cid
497remoteTableLabels :: Accessor RemoteTable (Map String Dynamic)
497remoteTableLabels :: Accessor RemoteTable (Map String Dynamic)
498remoteTableLabels = accessor _remoteTableLabels (\ls tbl -> tbl { _remoteTableLabels = ls })
498remoteTableLabels = accessor _remoteTableLabels (\ls tbl -> tbl { _remoteTableLabels = ls })
500−remoteTableDicts :: Accessor RemoteTable (Map String RuntimeSerializableSupport)
500+remoteTableDicts :: Accessor RemoteTable (Map TypeRep RuntimeSerializableSupport)
501remoteTableDicts = accessor _remoteTableDicts (\ds tbl -> tbl { _remoteTableDicts = ds })
501remoteTableDicts = accessor _remoteTableDicts (\ds tbl -> tbl { _remoteTableDicts = ds })
503remoteTableLabel :: String -> Accessor RemoteTable (Maybe Dynamic)
503remoteTableLabel :: String -> Accessor RemoteTable (Maybe Dynamic)
504remoteTableLabel label = remoteTableLabels >>> DAC.mapMaybe label
504remoteTableLabel label = remoteTableLabels >>> DAC.mapMaybe label
506−remoteTableDict :: String -> Accessor RemoteTable (Maybe RuntimeSerializableSupport)
506+remoteTableDict :: TypeRep -> Accessor RemoteTable (Maybe RuntimeSerializableSupport)
507remoteTableDict label = remoteTableDicts >>> DAC.mapMaybe label
507remoteTableDict label = remoteTableDicts >>> DAC.mapMaybe label
509--------------------------------------------------------------------------------
509--------------------------------------------------------------------------------