@@ -20,21 +20,24 @@
2020--
2121-- > unClosure :: Typeable a => Closure a -> Process a
2222--
23+-- In general, given a monomorphic function @f : a -> b@ the corresponding
24+-- function @$(mkClosure 'f)@ will have type @a -> Closure b@.
25+--
2326-- The call to 'remotable' will also generate a function
2427--
2528-- > __remoteCallMetaData :: RemoteCallMetaData -> RemoteCallMetaData
2629--
2730-- which can be used to construct the 'RemoteCallMetaData' used to initialize
28−-- Cloud Haskell. You should have one call to 'remotable' per module, and
29−-- compose all created functions when initializing Cloud Haskell:
31+-- Cloud Haskell. You should have (at most) one call to 'remotable' per module,
32+-- and compose all created functions when initializing Cloud Haskell:
3033--
3134-- > let metaData = M1.__remoteCallMetaData
3235-- > . M2.__remoteCallMetaData
3336-- > . ...
3437-- > . Mn.__remoteCallMetaData
35−-- > $ Map.empty
38+-- > $ initRemoteCallMetaData
3639--
37−-- See Section 6, Faking It, of Towards Haskell in the Cloud for more info.
40+-- See Section 6, /Faking It/, of /Towards Haskell in the Cloud/ for more info.
3841{-# LANGUAGE TemplateHaskell #-}
3942module Control.Distributed.Process.Closure
4043 ( unClosure
@@ -53,7 +56,6 @@ import Control.Monad.Reader (ask)
5356import Control.Exception (throw)
5457import Language.Haskell.TH ( -- Q monad and operations
5558 Q
56− , report
5759 , reify
5860 -- Names
5961 , Name
@@ -102,7 +104,6 @@ remotable :: [Name] -> Q [Dec]
102104remotable ns = do
103105 (closures, decoders, inserts) <- unzip3 <$> mapM process ns
104106 metaData <- createMetaData inserts
105− report False "Cloud Haskell '__remoteCallMetaData' generated"
106107 return $ concat closures ++ concat decoders ++ metaData
107108
108109-- | Deserialize a closure