Safe Haskell | None |
---|---|
Language | Haskell98 |
Synopsis
- 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]
- newtype Notification = Notification Value
- data Result
- newtype 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
Message | |
|
Instances
Functor Message Source # | |
Foldable Message Source # | |
Defined in HsDev.Server.Message fold :: Monoid m => Message m -> m # foldMap :: Monoid m => (a -> m) -> Message a -> m # foldr :: (a -> b -> b) -> b -> Message a -> b # foldr' :: (a -> b -> b) -> b -> Message a -> b # foldl :: (b -> a -> b) -> b -> Message a -> b # foldl' :: (b -> a -> b) -> b -> Message a -> b # foldr1 :: (a -> a -> a) -> Message a -> a # foldl1 :: (a -> a -> a) -> Message a -> a # elem :: Eq a => a -> Message a -> Bool # maximum :: Ord a => Message a -> a # minimum :: Ord a => Message a -> a # | |
Traversable Message Source # | |
Eq a => Eq (Message a) Source # | |
Ord a => Ord (Message a) Source # | |
Defined in HsDev.Server.Message | |
Show a => Show (Message a) Source # | |
ToJSON a => ToJSON (Message a) Source # | |
Defined in HsDev.Server.Message | |
FromJSON a => FromJSON (Message a) Source # | |
newtype Notification Source #
Notification from server
Instances
Eq Notification Source # | |
Defined in HsDev.Server.Message (==) :: Notification -> Notification -> Bool # (/=) :: Notification -> Notification -> Bool # | |
Show Notification Source # | |
Defined in HsDev.Server.Message showsPrec :: Int -> Notification -> ShowS # show :: Notification -> String # showList :: [Notification] -> ShowS # | |
ToJSON Notification Source # | |
Defined in HsDev.Server.Message toJSON :: Notification -> Value # toEncoding :: Notification -> Encoding # toJSONList :: [Notification] -> Value # toEncodingList :: [Notification] -> Encoding # | |
FromJSON Notification Source # | |
Defined in HsDev.Server.Message parseJSON :: Value -> Parser Notification # parseJSONList :: Value -> Parser [Notification] # |
Result from server
Result Value | Result |
Error HsDevError | Error |
newtype ResultPart Source #
Part of result list, returns via notification
Instances
ToJSON ResultPart Source # | |
Defined in HsDev.Server.Message toJSON :: ResultPart -> Value # toEncoding :: ResultPart -> Encoding # toJSONList :: [ResultPart] -> Value # toEncodingList :: [ResultPart] -> Encoding # | |
FromJSON ResultPart Source # | |
Defined in HsDev.Server.Message parseJSON :: Value -> Parser ResultPart # parseJSONList :: Value -> Parser [ResultPart] # |
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