distributed-process
distributed-process copied to clipboard
Generalize call to take a `Closure (SerializableDict a)`
Currently the type of Control.Distributed.Process.call is
call :: Serializable a
=> Static (SerializableDict a)
-> NodeId
-> Closure (Process a)
-> Process a
However, it can be straightforwardly generalized to take a Closure (SerializableDict a) instead of a Static (SerializableDict a). This is strictly more general because a Static a can always be turned into a Closure a, but not vice-versa. The necessary code, along with a description of a use case for the more general call is here.
I suggest providing a more general callClosure that takes a Closure (SerializableDict a) and re-defining call in terms of it.
I volunteer to implement.