summaryrefslogtreecommitdiff
path: root/examples/Shared.hs
diff options
context:
space:
mode:
authorSam T <pxqr.sta@gmail.com>2013-05-12 06:46:58 +0400
committerSam T <pxqr.sta@gmail.com>2013-05-12 06:46:58 +0400
commit5ee611585e4eb6acb89b34e6679d89e25098e23b (patch)
tree2ce638efe2782efc1559d82e859abf1129d34aad /examples/Shared.hs
parentee8c82ed5ba8be43d858fa28020cc249d21795f6 (diff)
- Remove Extractable class, fix multi param methods.
Diffstat (limited to 'examples/Shared.hs')
-rw-r--r--examples/Shared.hs19
1 files changed, 16 insertions, 3 deletions
diff --git a/examples/Shared.hs b/examples/Shared.hs
index 49cef490..2d5b9cbb 100644
--- a/examples/Shared.hs
+++ b/examples/Shared.hs
@@ -1,14 +1,27 @@
1{-# LANGUAGE OverloadedStrings #-} 1{-# LANGUAGE OverloadedStrings #-}
2module Shared (echoInt, swapM) where 2module Shared
3 (echoM, unitM, swapM, reverseM, shiftR
4 ) where
3 5
4import Remote.KRPC 6import Remote.KRPC
5 7
6echoInt :: Method Int Int 8unitM :: Method () ()
7echoInt = idM 9unitM = method "unit" [] []
10
11echoM :: Method Int Int
12echoM = method "echo" ["x"] ["x"]
13
14reverseM :: Method [Int] [Int]
15reverseM = method "reverse" ["xs"] ["ys"]
8 16
9swapM :: Method (Int, Int) (Int, Int) 17swapM :: Method (Int, Int) (Int, Int)
10swapM = method "swap" ["x", "y"] ["b", "a"] 18swapM = method "swap" ["x", "y"] ["b", "a"]
11 19
20shiftR :: Method ((), Int, [Int]) ([Int], (), Int)
21shiftR = method "shiftR" ["x", "y", "z"] ["a", "b", "c"]
22
23
24
12{- 25{-
13type NodeId = Int 26type NodeId = Int
14type InfoHashe = Int 27type InfoHashe = Int