Dear Cafe,
I'm trying to understand the implementation of Cloud Haskell, specially the closures. According to the documentation, the serialization of a function uses a map from Label to values (RemoteTable), where Remotable is implemented as:

newtype RemoteTable = RemoteTable (Map String Dynamic)

Where Dynamic is given by,
 
data Dynamic = Dynamic TypeRep GHC.Any

The question is then, How does this Dynamic data type encodes functions?
 And how is related this Dynamic type to the decoder function?

closure :: Static (ByteString -> a) --  Decoder
        -> ByteString               --  Encoded closure environment
        -> Closure a

Static provides two function, one function related to the label to lookup at the RemoteTable and one used for composition. But how is this  related to Dynamic?

Any guide will be appreciated.

Felipe Z.