git.iko.soy/distributed-process
on master help sign in
Rename remotableDec to remotableDecl
commit54fcbbd2331539972b40e4a5babdc6dca936743d authorEdsko de Vries <edsko@well-typed.com> dateWed 5 Sep 2012, 12:24 (14 years ago) parent5aea7b9
3 files changed+14−14
distributed-process/src/Control/Distributed/Process/Closure.hs+2−2 distributed-process/src/Control/Distributed/Process/Internal/Closure/TH.hs+10−10 distributed-process/tests/TestClosure.hs+2−2
distributed-process/src/Control/Distributed/Process/Closure.hs+2−2
@@ -179,7 +179,7 @@ module Control.Distributed.Process.Closure
179179#ifdef TemplateHaskellSupport
180180 -- * Template Haskell support for creating static values and closures
181181 , remotable
182− , remotableDec
182+ , remotableDecl
183183 , mkStatic
184184 , mkClosure
185185 , functionSDict
@@ -211,7 +211,7 @@ import Control.Distributed.Process.Internal.Closure.BuiltIn
211211#ifdef TemplateHaskellSupport
212212import Control.Distributed.Process.Internal.Closure.TH
213213 ( remotable
214− , remotableDec
214+ , remotableDecl
215215 , mkStatic
216216 , functionSDict
217217 , functionTDict
distributed-process/src/Control/Distributed/Process/Internal/Closure/TH.hs+10−10
@@ -3,7 +3,7 @@
33module Control.Distributed.Process.Internal.Closure.TH
44 ( -- * User-level API
55 remotable
6− , remotableDec
6+ , remotableDecl
77 , mkStatic
88 , functionSDict
99 , functionTDict
@@ -84,28 +84,28 @@ remotable ns = do
8484-- >
8585-- > remotable ['f]
8686--
87−-- with 'remotableDec' you would instead do
87+-- with 'remotableDecl' you would instead do
8888--
89−-- > remotableDec [
89+-- > remotableDecl [
9090-- > [d| f :: T1 -> T2 ;
9191-- > f = ...
9292-- > |]
9393-- > ]
9494--
95−-- 'remotableDec' creates the function specified as well as the various
95+-- 'remotableDecl' creates the function specified as well as the various
9696-- 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,
9898-- @$(mkClosure 'f)@ within the definition of @f@ itself.
9999--
100−-- NOTE: 'remotableDec' creates @__remoteTableDec@ instead of @__remoteTable@
101−-- so that you can use both 'remotable' and 'remotableDec' within the same
100+-- NOTE: 'remotableDecl' creates @__remoteTableDecl@ instead of @__remoteTable@
101+-- so that you can use both 'remotable' and 'remotableDecl' within the same
102102-- module.
103−remotableDec :: [Q [Dec]] -> Q [Dec]
104−remotableDec qDecs = do
103+remotableDecl :: [Q [Dec]] -> Q [Dec]
104+remotableDecl qDecs = do
105105 decs <- concat <$> sequence qDecs
106106 let types = catMaybes (map typeOf decs)
107107 (closures, inserts) <- unzip <$> mapM generateDefs types
108− rtable <- createMetaData (mkName "__remoteTableDec") (concat inserts)
108+ rtable <- createMetaData (mkName "__remoteTableDecl") (concat inserts)
109109 return $ decs ++ concat closures ++ rtable
110110 where
111111 typeOf :: Dec -> Maybe (Name, Type)
distributed-process/tests/TestClosure.hs+2−2
@@ -88,7 +88,7 @@ randomElement xs = do
8888 ix <- randomIO
8989 return (xs !! (ix `mod` length xs))
9090
91−remotableDec [
91+remotableDecl [
9292 [d| dfib :: ([NodeId], SendPort Integer, Integer) -> Process () ;
9393 dfib (_, reply, 0) = sendChan reply 0
9494 dfib (_, reply, 1) = sendChan reply 1
@@ -427,7 +427,7 @@ testSpawnReconnect transport rtable transportInternals = do
427427main :: IO ()
428428main = do
429429 Right (transport, transportInternals) <- createTransportExposeInternals "127.0.0.1" "8080" defaultTCPParameters
430− let rtable = __remoteTable . __remoteTableDec $ initRemoteTable
430+ let rtable = __remoteTable . __remoteTableDecl $ initRemoteTable
431431 runTests
432432 [ ("Unclosure", testUnclosure transport rtable)
433433 , ("Bind", testBind transport rtable)