Skip to content

Commit da58c86

Browse files
committed
Improved documentation
1 parent 72988c9 commit da58c86

File tree

1 file changed

+11
-9
lines changed

1 file changed

+11
-9
lines changed

src/Network/JsonRpc/Server.hs

Lines changed: 11 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,8 @@ module Network.JsonRpc.Server (
1414
-- ** Instructions
1515
-- $instructions
1616

17-
-- ** Unnamed and Optional Arguments
18-
-- $arguments
17+
-- ** Requests
18+
-- $requests
1919

2020
-- ** Example
2121
-- $example
@@ -57,13 +57,15 @@ import Control.Monad.Error (runErrorT, throwError)
5757
-- * Process a request by calling 'call' or 'callWithBatchStrategy'
5858
-- on the 'Methods' and input 'B.ByteString'.
5959

60-
-- $arguments
61-
-- RPC methods can have any mix of required and optional parameters.
62-
-- When a request uses unnamed arguments, the function is applied to
63-
-- the arguments in order. The function will be called as long as
64-
-- all required arguments are specified, and the number of arguments
65-
-- provided is not greater than the total number of required and
66-
-- optional parameters.
60+
-- $requests
61+
-- This library handles by-name and by-position arguments, batch and
62+
-- single requests, and notifications. It also allows each
63+
-- parameter of a method to be either optional (with a default value)
64+
-- or required. The function is called as long as all required
65+
-- arguments are present. A request providing more positional
66+
-- arguments than the total number of optional and required
67+
-- parameters to a function results in an error. However, additional
68+
-- by-name arguments are ignored.
6769

6870
-- $example
6971
-- Here is an example with three JSON-RPC methods. It reads requests

0 commit comments

Comments
 (0)