projects
/
lsp-test.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Merge branch 'master' into script-fsm
[lsp-test.git]
/
src
/
Language
/
Haskell
/
LSP
/
Test
/
Parsing.hs
diff --git
a/src/Language/Haskell/LSP/Test/Parsing.hs
b/src/Language/Haskell/LSP/Test/Parsing.hs
index 3ecc53888b31f5090b64344a866d512b5dd1460b..88109a5155801e2ed3015861c019ee4fd93217d6 100644
(file)
--- a/
src/Language/Haskell/LSP/Test/Parsing.hs
+++ b/
src/Language/Haskell/LSP/Test/Parsing.hs
@@
-85,7
+85,10
@@
castMsg = fromMaybe (error "Failed casting a message") . decode . encodeMsg
-- | A version of encode that encodes FromServerMessages as if they
-- weren't wrapped.
encodeMsg :: FromServerMessage -> B.ByteString
-- | A version of encode that encodes FromServerMessages as if they
-- weren't wrapped.
encodeMsg :: FromServerMessage -> B.ByteString
-encodeMsg = encode . genericToJSON (defaultOptions { sumEncoding = UntaggedValue })
+encodeMsg = encode . toJSONMsg
+
+toJSONMsg :: FromServerMessage -> Value
+toJSONMsg = genericToJSON (defaultOptions { sumEncoding = UntaggedValue })
-- | Matches if the message is a log message notification or a show message notification/request.
loggingNotification :: Session FromServerMessage
-- | Matches if the message is a log message notification or a show message notification/request.
loggingNotification :: Session FromServerMessage