Safe Haskell | None |
---|---|
Language | Haskell2010 |
Hyperion.CallClosure
Documentation
cpSend' :: forall a. Closure (SerializableDict a) -> ProcessId -> Closure (a -> Process ()) Source #
The purpose of this module is to generalize call
from
Process
so that it takes a 'Closure
(SerializableDict a)' instead of a 'Static (SerializableDict
a)'. Note that this is a strict generalization because any 'Static
a' can be turned into 'Closure a' via staticClosure
, while a
'Closure a' cannot be turned into a 'Static a' in general.
Note: The extra flexibility afforded by call' is needed in
conjunction with the 'Hyperion.Static (KnownNat j)'
instance. In that case, we cannot construct a
'Control.Distributed.Static.Static (Dict (KnownNat j))', but we can
construct a 'Closure (Dict (KnownNat j))'. NB: The name Static
is
used in two places: Static
and
Static
. The former is a datatype and the latter
is a typeclass.
Most of the code here has been copied from
Process
and
Closure
, with small modifications.
CP
version of send
that uses a 'Closure (SerializableDict a)'
instead of 'Static (SerializableDict a)'