git.iko.soy/distributed-process
on master help sign in
Skeleton demo
b7e3aceEdsko de Vries
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
18 Location: https://github.com/haskell-distributed/distributed-process
18 Location: https://github.com/haskell-distributed/distributed-process
19 SubDir: distributed-process-azure
19 SubDir: distributed-process-azure
20
20
21+Flag build-demos
22+ description: Build the demos
23+ default: False
24+
21Library
25Library
22 Build-Depends: base >= 4.4 && < 5,
26 Build-Depends: base >= 4.4 && < 5,
23 azure-service-api >= 0.1 && < 0.2,
27 azure-service-api >= 0.1 && < 0.2,
@@ -42,11 +46,26 @@ Library
42 ghc-options: -Wall
46 ghc-options: -Wall
43 HS-Source-Dirs: src
47 HS-Source-Dirs: src
44
48
45−Executable cloud-haskell-azure
49+Executable cloud-haskell-azure-ping
46− Main-Is: src/Control/Distributed/Process/Backend/Azure/CommandLine.hs
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)
47− Build-Depends: base >= 4.4 && < 5,
63+ Build-Depends: base >= 4.4 && < 5,
48 distributed-process-azure >= 0.1 && < 0.2,
64 distributed-process-azure >= 0.1 && < 0.2,
49 distributed-process >= 0.2 && < 0.3,
65 distributed-process >= 0.2 && < 0.3,
50 transformers >= 0.3 && < 0.4,
66 transformers >= 0.3 && < 0.4,
51 bytestring >= 0.9 && < 0.11,
67 bytestring >= 0.9 && < 0.11,
52 binary >= 0.5 && < 0.6
68 binary >= 0.5 && < 0.6
69+ else
70+ buildable: False
71+ Main-Is: demos/Conway.hs