git.iko.soy/distributed-process
on master help sign in
Cleanup
commit9d53fc4e877e2589412584a0acafd297454d7d44 authorEdsko de Vries <edsko@edsko.net> dateTue 10 Jul 2012, 12:48 (14 years ago) parent0328ade
4 files changed+6−33
distributed-process/distributed-process.cabal+1−1 distributed-process/src/Control/Distributed/Process/Internal/Closure.hs → distributed-process/src/Control/Distributed/Process/Internal/Closure/Resolution.hs+1−23 distributed-process/src/Control/Distributed/Process/Internal/Primitives.hs+1−1 distributed-process/src/Control/Distributed/Process/Node.hs+3−8
distributed-process/distributed-process.cabal+1−1
@@ -51,13 +51,13 @@ Library
5151 Control.Distributed.Process.Internal.Primitives,
5252 Control.Distributed.Process.Internal.CQueue,
5353 Control.Distributed.Process.Internal.Dynamic,
54− Control.Distributed.Process.Internal.Closure,
5554 Control.Distributed.Process.Internal.TypeRep,
5655 Control.Distributed.Process.Internal.MessageT,
5756 Control.Distributed.Process.Internal.Types,
5857 Control.Distributed.Process.Internal.Closure.BuiltIn,
5958 Control.Distributed.Process.Internal.Closure.Combinators,
6059 Control.Distributed.Process.Internal.Closure.TH,
60+ Control.Distributed.Process.Internal.Closure.Resolution,
6161 Control.Distributed.Process.Internal.Node
6262 Extensions: RankNTypes,
6363 ScopedTypeVariables,
distributed-process/src/Control/Distributed/Process/Internal/Closure.hs → distributed-process/src/Control/Distributed/Process/Internal/Closure/Resolution.hsrenamed+1−23
@@ -1,8 +1,5 @@
11{-# LANGUAGE MagicHash #-}
2−module Control.Distributed.Process.Internal.Closure
3− ( -- * Runtime support
4− resolveClosure
5− ) where
2+module Control.Distributed.Process.Internal.Closure.Resolution (resolveClosure) where
63
74import Data.Accessor ((^.))
85import Data.ByteString.Lazy (ByteString)
@@ -29,23 +26,6 @@ import Control.Distributed.Process.Internal.Dynamic
2926 )
3027import Control.Distributed.Process.Internal.TypeRep () -- Binary instances
3128
32−{-
33−import qualified Control.Distributed.Process.Internal.Closure.BuiltIn as BuiltIn
34− (remoteTable)
35−import qualified Control.Distributed.Process.Internal.Closure.Combinators as Combinators
36− (remoteTable)
37−
38−-- | Initial (empty) remote-call meta data
39−initRemoteTable :: RemoteTable
40−initRemoteTable = BuiltIn.remoteTable
41− . Combinators.remoteTable
42− $ RemoteTable Map.empty Map.empty
43−-}
44−
45−--------------------------------------------------------------------------------
46−-- Runtime support for closures --
47−--------------------------------------------------------------------------------
48−
4929resolveClosure :: RemoteTable -> StaticLabel -> ByteString -> Maybe Dynamic
5030-- Built-in closures
5131resolveClosure rtable ClosureSend env = do
@@ -88,8 +68,6 @@ resolveClosure rtable CpApply env =
8868resolveClosure rtable (UserStatic label) env = do
8969 val <- rtable ^. remoteTableLabel label
9070 dynApply val (toDyn env)
91−
92−-- User-defined polymorphic closures
9371resolveClosure rtable (PolyStatic label) env = do
9472 Dynamic _ val <- rtable ^. remoteTableLabel label
9573 return (Dynamic (decode env) val)
distributed-process/src/Control/Distributed/Process/Internal/Primitives.hs+1−1
@@ -118,7 +118,7 @@ import Control.Distributed.Process.Internal.MessageT
118118 , getLocalNode
119119 )
120120import Control.Distributed.Process.Internal.Node (runLocalProcess)
121−import Control.Distributed.Process.Internal.Closure (resolveClosure)
121+import Control.Distributed.Process.Internal.Closure.Resolution (resolveClosure)
122122import Control.Distributed.Process.Internal.Dynamic (fromDyn, dynTypeRep)
123123
124124--------------------------------------------------------------------------------
distributed-process/src/Control/Distributed/Process/Node.hs+3−8
@@ -118,16 +118,11 @@ import Control.Distributed.Process.Internal.MessageT
118118 , createMessage
119119 )
120120import Control.Distributed.Process.Internal.Dynamic (fromDynamic)
121−import Control.Distributed.Process.Internal.Closure
122− (
123− resolveClosure
124− )
121+import Control.Distributed.Process.Internal.Closure.Resolution (resolveClosure)
125122import Control.Distributed.Process.Internal.Node (runLocalProcess)
126123import Control.Distributed.Process.Internal.Primitives (expect, register)
127−import qualified Control.Distributed.Process.Internal.Closure.BuiltIn as BuiltIn
128− (remoteTable)
129−import qualified Control.Distributed.Process.Internal.Closure.Combinators as Combinators
130− (remoteTable)
124+import qualified Control.Distributed.Process.Internal.Closure.BuiltIn as BuiltIn (remoteTable)
125+import qualified Control.Distributed.Process.Internal.Closure.Combinators as Combinators (remoteTable)
131126
132127--------------------------------------------------------------------------------
133128-- Initialization --