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
|
{-# LANGUAGE OverloadedStrings #-}
module Shared
(echoM, echoBytes, unitM, swapM, reverseM, shiftR
) where
import Data.ByteString (ByteString)
import Remote.KRPC
unitM :: Method () ()
unitM = method "unit" [] []
echoM :: Method Int Int
echoM = method "echo" ["x"] ["x"]
echoBytes :: Method ByteString ByteString
echoBytes = method "echoBytes" ["x"] ["x"]
reverseM :: Method [Int] [Int]
reverseM = method "reverse" ["xs"] ["ys"]
swapM :: Method (Int, Int) (Int, Int)
swapM = method "swap" ["x", "y"] ["b", "a"]
shiftR :: Method ((), Int, [Int]) ([Int], (), Int)
shiftR = method "shiftR" ["x", "y", "z"] ["a", "b", "c"]
|