From 5ee611585e4eb6acb89b34e6679d89e25098e23b Mon Sep 17 00:00:00 2001 From: Sam T Date: Sun, 12 May 2013 06:46:58 +0400 Subject: - Remove Extractable class, fix multi param methods. --- examples/Shared.hs | 19 ++++++++++++++++--- 1 file changed, 16 insertions(+), 3 deletions(-) (limited to 'examples/Shared.hs') 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 @@ {-# LANGUAGE OverloadedStrings #-} -module Shared (echoInt, swapM) where +module Shared + (echoM, unitM, swapM, reverseM, shiftR + ) where import Remote.KRPC -echoInt :: Method Int Int -echoInt = idM +unitM :: Method () () +unitM = method "unit" [] [] + +echoM :: Method Int Int +echoM = method "echo" ["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"] + + + {- type NodeId = Int type InfoHashe = Int -- cgit v1.2.3