summaryrefslogtreecommitdiff
path: root/src/Remote/KRPC/Method.hs
diff options
context:
space:
mode:
Diffstat (limited to 'src/Remote/KRPC/Method.hs')
-rw-r--r--src/Remote/KRPC/Method.hs54
1 files changed, 0 insertions, 54 deletions
diff --git a/src/Remote/KRPC/Method.hs b/src/Remote/KRPC/Method.hs
deleted file mode 100644
index 4d91fe47..00000000
--- a/src/Remote/KRPC/Method.hs
+++ /dev/null
@@ -1,54 +0,0 @@
1-- |
2-- Copyright : (c) Sam T. 2013
3-- License : MIT
4-- Maintainer : pxqr.sta@gmail.com
5-- Stability : experimental
6-- Portability : portable
7--
8{-# LANGUAGE OverloadedStrings #-}
9{-# LANGUAGE FlexibleInstances, UndecidableInstances #-}
10module Remote.KRPC.Method
11 ( Method(methodName, methodParams, methodVals)
12
13 -- * Construction
14 , method
15
16 -- * Predefined methods
17 , idM
18 ) where
19
20import Remote.KRPC.Protocol
21
22
23-- | The
24--
25-- * argument: type of method parameter
26--
27-- * remote: A monad used by server-side.
28--
29-- * result: type of return value of the method.
30--
31data Method param result = Method {
32 -- | Name used in query and
33 methodName :: MethodName
34
35 -- | Description of each parameter in /right to left/ order.
36 , methodParams :: [ParamName]
37
38 -- | Description of each return value in /right to left/ order.
39 , methodVals :: [ValName]
40 }
41
42-- TODO ppMethod
43
44-- | Remote identity function. Could be used for echo servers for example.
45--
46-- idM = method "id" ["x"] ["y"] return
47--
48idM :: Method a a
49idM = method "id" ["x"] ["y"]
50{-# INLINE idM #-}
51
52method :: MethodName -> [ParamName] -> [ValName] -> Method param result
53method = Method
54{-# INLINE method #-}