git.iko.soy/distributed-process
on master help sign in
Skeleton demo
commitb7e3ace47cdd0027daaeb5b1d012609a3953f4b1 authorEdsko de Vries <edsko@well-typed.com> dateMon 6 Aug 2012, 13:21 (14 years ago) parent94336e6
3 files changed+44−3
distributed-process-azure/demos/Conway.hs+22 distributed-process-azure/src/Control/Distributed/Process/Backend/Azure/CommandLine.hs → distributed-process-azure/demos/Ping.hs distributed-process-azure/distributed-process-azure.cabal+22−3
distributed-process-azure/demos/Conway.hsnew file+22
@@ -0,0 +1,22 @@
1+{-# LANGUAGE TemplateHaskell #-}
2+import Control.Distributed.Process
3+ ( Process
4+ , Closure
5+ )
6+import Control.Distributed.Process.Closure
7+ ( remotable )
8+import Control.Distributed.Process.Backend.Azure.GenericMain
9+ ( genericMain
10+ , ProcessPair(..)
11+ )
12+
13+remotable []
14+
15+main :: IO ()
16+main = genericMain __remoteTable callable spawnable
17+ where
18+ callable :: String -> IO (ProcessPair ())
19+ callable _ = error "spawnable: unknown"
20+
21+ spawnable :: String -> IO (Closure (Process ()))
22+ spawnable _ = error "callable: unknown"
distributed-process-azure/src/Control/Distributed/Process/Backend/Azure/CommandLine.hs → distributed-process-azure/demos/Ping.hsrenamed

The content is the same.

distributed-process-azure/distributed-process-azure.cabal+22−3
@@ -18,6 +18,10 @@ Source-Repository head
1818 Location: https://github.com/haskell-distributed/distributed-process
1919 SubDir: distributed-process-azure
2020
21+Flag build-demos
22+ description: Build the demos
23+ default: False
24+
2125Library
2226 Build-Depends: base >= 4.4 && < 5,
2327 azure-service-api >= 0.1 && < 0.2,
@@ -42,11 +46,26 @@ Library
4246 ghc-options: -Wall
4347 HS-Source-Dirs: src
4448
45−Executable cloud-haskell-azure
46− Main-Is: src/Control/Distributed/Process/Backend/Azure/CommandLine.hs
47− Build-Depends: base >= 4.4 && < 5,
49+Executable cloud-haskell-azure-ping
50+ if flag(build-demos)
51+ Build-Depends: base >= 4.4 && < 5,
52+ distributed-process-azure >= 0.1 && < 0.2,
53+ distributed-process >= 0.2 && < 0.3,
54+ transformers >= 0.3 && < 0.4,
55+ bytestring >= 0.9 && < 0.11,
56+ binary >= 0.5 && < 0.6
57+ else
58+ buildable: False
59+ Main-Is: demos/Ping.hs
60+
61+Executable cloud-haskell-azure-conway
62+ if flag(build-demos)
63+ Build-Depends: base >= 4.4 && < 5,
4864 distributed-process-azure >= 0.1 && < 0.2,
4965 distributed-process >= 0.2 && < 0.3,
5066 transformers >= 0.3 && < 0.4,
5167 bytestring >= 0.9 && < 0.11,
5268 binary >= 0.5 && < 0.6
69+ else
70+ buildable: False
71+ Main-Is: demos/Conway.hs