@@ -3,7 +3,7 @@
3module Control.Distributed.Process.Internal.Closure.TH
3module Control.Distributed.Process.Internal.Closure.TH
4 ( -- * User-level API
4 ( -- * User-level API
6− , remotableDec
6+ , remotableDecl
8 , functionSDict
8 , functionSDict
9 , functionTDict
9 , functionTDict
@@ -84,28 +84,28 @@ remotable ns = do
85-- > remotable ['f]
85-- > remotable ['f]
87−-- with 'remotableDec' you would instead do
87+-- with 'remotableDecl' you would instead do
89−-- > remotableDec [
89+-- > remotableDecl [
90-- > [d| f :: T1 -> T2 ;
90-- > [d| f :: T1 -> T2 ;
91-- > f = ...
91-- > f = ...
95−-- 'remotableDec' creates the function specified as well as the various
95+-- 'remotableDecl' creates the function specified as well as the various
96-- dictionaries and static versions that 'remotable' also creates.
96-- dictionaries and static versions that 'remotable' also creates.
97−-- 'remotableDec' is sometimes necessary when you want to refer to, say,
97+-- 'remotableDecl' is sometimes necessary when you want to refer to, say,
98-- @$(mkClosure 'f)@ within the definition of @f@ itself.
98-- @$(mkClosure 'f)@ within the definition of @f@ itself.
100−-- NOTE: 'remotableDec' creates @__remoteTableDec@ instead of @__remoteTable@
100+-- NOTE: 'remotableDecl' creates @__remoteTableDecl@ instead of @__remoteTable@
101−-- so that you can use both 'remotable' and 'remotableDec' within the same
101+-- so that you can use both 'remotable' and 'remotableDecl' within the same
102-- module.
102-- module.
103−remotableDec :: [Q [Dec]] -> Q [Dec]
103+remotableDecl :: [Q [Dec]] -> Q [Dec]
104−remotableDec qDecs = do
104+remotableDecl qDecs = do
105 decs <- concat <$> sequence qDecs
105 decs <- concat <$> sequence qDecs
106 let types = catMaybes (map typeOf decs)
106 let types = catMaybes (map typeOf decs)
107 (closures, inserts) <- unzip <$> mapM generateDefs types
107 (closures, inserts) <- unzip <$> mapM generateDefs types
108− rtable <- createMetaData (mkName "__remoteTableDec") (concat inserts)
108+ rtable <- createMetaData (mkName "__remoteTableDecl") (concat inserts)
109 return $ decs ++ concat closures ++ rtable
109 return $ decs ++ concat closures ++ rtable
111 typeOf :: Dec -> Maybe (Name, Type)
111 typeOf :: Dec -> Maybe (Name, Type)