git.iko.soy/distributed-process
on master help sign in
Cleanup
c18c62fEdsko de Vries
distributed-process/distributed-process.cabal+17−50
@@ -73,74 +73,41 @@ Library
73 ghc-options: -Wall
73 ghc-options: -Wall
74 HS-Source-Dirs: src
74 HS-Source-Dirs: src
75 if flag(th)
75 if flag(th)
76− Build-Depends: template-haskell >= 2.6 && < 2.9
76+ Build-Depends: template-haskell >= 2.6 && < 2.9
77 Exposed-modules: Control.Distributed.Process.Internal.Closure.TH
77 Exposed-modules: Control.Distributed.Process.Internal.Closure.TH
78+ CPP-Options: -DTemplateHaskellSupport
78
79
79Test-Suite TestCH
80Test-Suite TestCH
80 Type: exitcode-stdio-1.0
81 Type: exitcode-stdio-1.0
81 Main-Is: TestCH.hs
82 Main-Is: TestCH.hs
82 Build-Depends: base >= 4.4 && < 5,
83 Build-Depends: base >= 4.4 && < 5,
83− binary >= 0.5 && < 0.6,
84− network-transport >= 0.2 && < 0.3,
85− network-transport-tcp >= 0.2 && < 0.3,
86− stm >= 2.3 && < 2.5,
87− transformers >= 0.2 && < 0.4,
88− mtl >= 2.0 && < 2.2,
89− data-accessor >= 0.2 && < 0.3,
90− bytestring >= 0.9 && < 0.11,
91− containers >= 0.4 && < 0.6,
92− old-locale >= 1.0 && < 1.1,
93− time >= 1.2 && < 1.5,
94− template-haskell >= 2.6 && < 2.9,
95 random >= 1.0 && < 1.1,
84 random >= 1.0 && < 1.1,
96− ghc-prim >= 0.2 && < 0.4,
97 ansi-terminal >= 0.5 && < 0.6,
85 ansi-terminal >= 0.5 && < 0.6,
98− distributed-static >= 0.2 && < 0.3,
86+ distributed-process >= 0.3 && < 0.4,
99− rank1dynamic >= 0.1 && < 0.2
87+ network-transport >= 0.2 && < 0.3,
88+ network-transport-tcp >= 0.2 && < 0.3,
89+ binary >= 0.5 && < 0.6
90+ Other-modules: TestAuxiliary
100− Extensions: RankNTypes,
91+ Extensions: CPP,
101 ScopedTypeVariables,
92 ScopedTypeVariables,
102− FlexibleInstances,
103− UndecidableInstances,
104− ExistentialQuantification,
105− GADTs,
106− GeneralizedNewtypeDeriving,
107 DeriveDataTypeable,
93 DeriveDataTypeable,
108− CPP
94+ GeneralizedNewtypeDeriving
109 ghc-options: -Wall -threaded -rtsopts -with-rtsopts=-N -fno-warn-unused-do-bind
95 ghc-options: -Wall -threaded -rtsopts -with-rtsopts=-N -fno-warn-unused-do-bind
110− HS-Source-Dirs: tests src
96+ HS-Source-Dirs: tests
111
97
112Test-Suite TestClosure
98Test-Suite TestClosure
113 Type: exitcode-stdio-1.0
99 Type: exitcode-stdio-1.0
114 Main-Is: TestClosure.hs
100 Main-Is: TestClosure.hs
115 Build-Depends: base >= 4.4 && < 5,
101 Build-Depends: base >= 4.4 && < 5,
116− binary >= 0.5 && < 0.6,
117− network-transport >= 0.2 && < 0.3,
118− network-transport-tcp >= 0.2 && < 0.3,
119− stm >= 2.3 && < 2.5,
120− transformers >= 0.2 && < 0.4,
121− mtl >= 2.0 && < 2.2,
122− data-accessor >= 0.2 && < 0.3,
123− bytestring >= 0.9 && < 0.11,
124− containers >= 0.4 && < 0.6,
125− old-locale >= 1.0 && < 1.1,
126− time >= 1.2 && < 1.5,
127− template-haskell >= 2.6 && < 2.9,
128 random >= 1.0 && < 1.1,
102 random >= 1.0 && < 1.1,
129− ghc-prim >= 0.2 && < 0.4,
130 ansi-terminal >= 0.5 && < 0.6,
103 ansi-terminal >= 0.5 && < 0.6,
131 distributed-static >= 0.2 && < 0.3,
104 distributed-static >= 0.2 && < 0.3,
132− rank1dynamic >= 0.1 && < 0.2,
105+ distributed-process >= 0.3 && < 0.4,
133− syb >= 0.3 && < 0.4
106+ network-transport >= 0.2 && < 0.3,
107+ network-transport-tcp >= 0.2 && < 0.3,
108+ bytestring >= 0.9 && < 0.11
134 Other-modules: TestAuxiliary
109 Other-modules: TestAuxiliary
135− Extensions: RankNTypes,
110+ Extensions: CPP,
136− ScopedTypeVariables,
111+ ScopedTypeVariables
137− FlexibleInstances,
138− UndecidableInstances,
139− ExistentialQuantification,
140− GADTs,
141− GeneralizedNewtypeDeriving,
142− DeriveDataTypeable,
143− TemplateHaskell,
144− CPP
145 ghc-options: -Wall -threaded -rtsopts -with-rtsopts=-N -fno-warn-unused-do-bind
112 ghc-options: -Wall -threaded -rtsopts -with-rtsopts=-N -fno-warn-unused-do-bind
146− HS-Source-Dirs: tests src
113+ HS-Source-Dirs: tests
distributed-process/src/Control/Distributed/Process/Closure.hs+2−2
@@ -176,7 +176,7 @@ module Control.Distributed.Process.Closure
176 , cpSend
176 , cpSend
177 , cpExpect
177 , cpExpect
178 , cpNewChan
178 , cpNewChan
179−#ifdef TH
179+#ifdef TemplateHaskellSupport
180 -- * Template Haskell support for creating static values and closures
180 -- * Template Haskell support for creating static values and closures
181 , remotable
181 , remotable
182 , mkStatic
182 , mkStatic
@@ -207,7 +207,7 @@ import Control.Distributed.Process.Internal.Closure.BuiltIn
207 , cpExpect
207 , cpExpect
208 , cpNewChan
208 , cpNewChan
209 )
209 )
210−#ifdef TH
210+#ifdef TemplateHaskellSupport
211import Control.Distributed.Process.Internal.Closure.TH
211import Control.Distributed.Process.Internal.Closure.TH
212 ( remotable
212 ( remotable
213 , mkStatic
213 , mkStatic
distributed-process/tests/TestClosure.hs+2−1
@@ -1,3 +1,4 @@
1+{-# LANGUAGE TemplateHaskell #-}
1module Main where
2module Main where
2
3
3import Data.ByteString.Lazy (empty)
4import Data.ByteString.Lazy (empty)
@@ -290,7 +291,7 @@ testSpawnInvalid transport rtable = do
290 node <- newLocalNode transport rtable
291 node <- newLocalNode transport rtable
291 done <- newEmptyMVar
292 done <- newEmptyMVar
292 forkProcess node $ do
293 forkProcess node $ do
293− (pid, ref) <- spawnMonitor (localNodeId node) (Closure (staticLabel "ThisDoesNotExist") empty)
294+ (pid, ref) <- spawnMonitor (localNodeId node) (closure (staticLabel "ThisDoesNotExist") empty)
294 ProcessMonitorNotification ref' pid' _reason <- expect
295 ProcessMonitorNotification ref' pid' _reason <- expect
295 -- Depending on the exact interleaving, reason might be NoProc or the exception thrown by the absence of the static closure
296 -- Depending on the exact interleaving, reason might be NoProc or the exception thrown by the absence of the static closure
296 True <- return $ ref' == ref && pid == pid'
297 True <- return $ ref' == ref && pid == pid'