Safe Haskell | None |
---|---|
Language | Haskell98 |
- data Message a = Message {}
- messagesById :: Maybe String -> [Message a] -> [a]
- data Notification = Notification Value
- data Result
- data ResultPart = ResultPart Value
- type Response = Either Notification Result
- isNotification :: Response -> Bool
- notification :: ToJSON a => a -> Response
- result :: ToJSON a => a -> Response
- responseError :: String -> [Pair] -> Response
- resultPart :: ToJSON a => a -> Notification
- groupResponses :: [Response] -> [([Notification], Result)]
- responsesById :: Maybe String -> [Message Response] -> [([Notification], Result)]
Documentation
Message with id to link request and response
messagesById :: Maybe String -> [Message a] -> [a] Source
Get messages by id
data Notification Source
Notification from server
Result from server
data ResultPart Source
Part of result list, returns via notification
type Response = Either Notification Result Source
isNotification :: Response -> Bool Source
notification :: ToJSON a => a -> Response Source
responseError :: String -> [Pair] -> Response Source
resultPart :: ToJSON a => a -> Notification Source
groupResponses :: [Response] -> [([Notification], Result)] Source
responsesById :: Maybe String -> [Message Response] -> [([Notification], Result)] Source