-
Notifications
You must be signed in to change notification settings - Fork 1
/
remote-monad.cabal
186 lines (171 loc) · 6.84 KB
/
remote-monad.cabal
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
-- Initial remote-monad.cabal generated by cabal init. For further
-- documentation, see http://haskell.org/cabal/users-guide/
name: remote-monad
version: 0.5
synopsis: A parametrizable Remote Monad, and parametrizable Applicative Functor
description:
An implementation of the concepts behind Remote Monads. There is support for various bundling strategies for remote primitives. We currently support read-only queries (WithoutAsync), and read-write primitives: commands(asynchronous) and procedures(syncronous).
.
@
{-# LANGUAGE GADTs #-}
{-# LANGUAGE KindSignatures #-}
.
module Main where
.
import Control.Natural (nat, (#))
import Control.Remote.Monad
import Control.Remote.Packet.Weak
.
data Command :: * where
  Say :: String -> Command
.
data Procedure :: * -> * where
  Temperature :: Procedure Int
.
say :: String -> RemoteMonad Command Procedure ()
say s = command (Say s)
.
temperature :: RemoteMonad Command Procedure Int
temperature = procedure Temperature
.
runWP :: WeakPacket Command Procedure a -> IO a
runWP (Command (Say s)) = print s
runWP (Procedure Temperature) = return 42
.
send :: RemoteMonad Command Procedure a -> IO a
send = run $ runMonad $ nat runWP
.
main = send $ do
  say "Howdy doodly do"
  say "How about a muffin?"
  t <- temperature
  say (show t ++ "F")
@
license: BSD3
license-file: LICENSE
author: Andy Gill, Justin Dawson
maintainer: [email protected]
copyright: (c) 2016 The University of Kansas
category: Control
build-type: Simple
tested-with: GHC == 7.10.3
, GHC == 8.0.2
, GHC == 8.2.2
, GHC == 8.4.4
, GHC == 8.6.5
, GHC == 8.8.1
cabal-version: >=1.10
extra-source-files: CHANGELOG.md, README.md
source-repository head
type: git
location: git://github.com/ku-fpg/remote-monad
library
exposed-modules:
Control.Remote.Packet.Alternative
Control.Remote.Packet.Applicative
Control.Remote.Packet.Query
Control.Remote.Packet.Strong
Control.Remote.Packet.Weak
Control.Remote.Packet
Control.Remote.Applicative
Control.Remote.Applicative.Types
Control.Remote.Monad
Control.Remote.Monad.Types
Control.Remote.Util
other-modules:
other-extensions: GADTs, RankNTypes, ScopedTypeVariables
build-depends: base >=4.8 && < 5
, exceptions >= 0.8 && < 0.11
, natural-transformation >= 0.4 && < 0.5
, transformers >= 0.4 && < 0.6
, mtl >= 2.2 && < 2.3
hs-source-dirs: src
default-language: Haskell2010
test-suite remote-monad-async-example
type: exitcode-stdio-1.0
main-is: Main.hs
build-depends: base >= 4.7 && < 5
, exceptions >= 0.8 && < 0.11
, natural-transformation >= 0.4 && < 0.5
, remote-monad
hs-source-dirs: examples/async
default-language: Haskell2010
ghc-options: -Wall
test-suite remote-monad-query-example
type: exitcode-stdio-1.0
main-is: Main.hs
build-depends: base >= 4.7 && < 5
, exceptions >= 0.8 && < 0.11
, natural-transformation >= 0.4 && < 0.5
, remote-monad
hs-source-dirs: examples/query
default-language: Haskell2010
ghc-options: -Wall
test-suite remote-monad-properties
type: exitcode-stdio-1.0
main-is: Test.hs
build-depends: base >= 4.7 && < 5
, containers >= 0.1 && < 0.7
, natural-transformation >= 0.4 && < 0.5
, remote-monad
, QuickCheck >= 2.8 && < 2.14
, quickcheck-instances >= 0.1 && < 0.4
, tasty >= 0.8 && < 1.3
, tasty-quickcheck >= 0.8 && < 0.11
hs-source-dirs: tests
default-language: Haskell2010
ghc-options: -Wall
--executable remote-monad-example-reader
-- main-is: Main.hs
-- hs-source-dirs: examples/Reader
-- build-depends: base
-- , remote-monad
-- , natural-transformation >= 0.4 && < 0.5
-- default-language: Haskell2010
test-suite remote-monad-example-state
type: exitcode-stdio-1.0
main-is: Main.hs
ghc-options: -Wall
hs-source-dirs: examples/State
build-depends: base
, bytestring >= 0.10 && < 0.11
, http-client >= 0.5 && < 0.7
, mtl
, natural-transformation >= 0.4 && < 0.5
, remote-monad
, scotty
, text
, transformers
, wai-extra
default-language: Haskell2010
--executable remote-monad-example-fb
-- main-is: TestFB.hs
-- ghc-options: -Wall
-- hs-source-dirs: examples/facebook
-- build-depends: base >=4.6 && <4.8
-- , aeson >=0.6 && <0.8
-- , fb >=1.0 && <1.1
-- , http-conduit >=2.1 && <2.2
-- , resourcet >=1.1 && <1.2
-- , text >=0.11 && <1.2
-- , transformers >=0.3 && <0.5
-- , hashable >=1.2 && <1.3
-- , data-default >=0.5 && <0.6
-- , http-client-tls >=0.2 && <0.3
-- , time >=1.4 && <1.5
-- , conduit >=1.1 && <1.2
-- , async >=2.0 && <2.1
-- , haxl == 0.1.*
-- , unordered-containers == 0.2.*
-- , time == 1.4.*
-- , vector >= 0.10 && < 0.11
-- default-language: Haskell2010
benchmark remote-monad-bench
type: exitcode-stdio-1.0
hs-source-dirs: . criterion
main-is: Bench.hs
build-depends: base
, remote-monad
, natural-transformation >= 0.4 && < 0.5
, criterion
default-language: Haskell2010