| Safe Haskell | None |
|---|---|
| Language | Haskell98 |
HsDev.Server.Message
- data Message a = Message {
- _messageId :: Maybe String
- _message :: a
- messageId :: forall a. Lens' (Message a) (Maybe String)
- message :: forall a a. Lens (Message a) (Message a) a a
- messagesById :: Maybe String -> [Message a] -> [a]
- data Notification = Notification Value
- data Result
- data ResultPart = ResultPart Value
- newtype Response = Response {}
- isNotification :: Response -> Bool
- result :: ToJSON a => a -> Response
- responseError :: HsDevError -> Response
- groupResponses :: [Response] -> [([Notification], Result)]
- decodeMessage :: FromJSON a => ByteString -> Either (Msg String) (Msg (Message a))
- encodeMessage :: ToJSON a => Msg (Message a) -> ByteString
- module HsDev.Server.Message.Lisp
Documentation
Message with id to link request and response
Constructors
| Message | |
Fields
| |
Result from server
Constructors
| Result Value | Result |
| Error HsDevError | Error |
data ResultPart Source #
Part of result list, returns via notification
Constructors
| ResultPart Value |
Instances
Constructors
| Response | |
Fields | |
isNotification :: Response -> Bool Source #
responseError :: HsDevError -> Response Source #
groupResponses :: [Response] -> [([Notification], Result)] Source #
decodeMessage :: FromJSON a => ByteString -> Either (Msg String) (Msg (Message a)) Source #
Decode lisp or json request
encodeMessage :: ToJSON a => Msg (Message a) -> ByteString Source #
module HsDev.Server.Message.Lisp