X-Git-Url: http://git.lukelau.me/?a=blobdiff_plain;f=src%2FLanguage%2FHaskell%2FLSP%2FTest%2FParsing.hs;h=892f33046771e91608dc0fd85db13b08a66524c1;hb=a3130a85efbf9249ab983bcf66586ed3c596e33a;hp=14db732e5990c25367fe9ca9c79e78278081255c;hpb=4de144bafd28f3f2a8067a896bedb1430f68f745;p=lsp-test.git diff --git a/src/Language/Haskell/LSP/Test/Parsing.hs b/src/Language/Haskell/LSP/Test/Parsing.hs index 14db732..892f330 100644 --- a/src/Language/Haskell/LSP/Test/Parsing.hs +++ b/src/Language/Haskell/LSP/Test/Parsing.hs @@ -11,7 +11,6 @@ import Language.Haskell.LSP.Types hiding ( error ) import Language.Haskell.LSP.Messages import qualified Data.HashMap.Strict as HM -import Debug.Trace getAllMessages :: Handle -> IO [B.ByteString] getAllMessages h = do @@ -109,7 +108,7 @@ matchResponseMsgType req bytes = case req of decodeFromServerMsg :: RequestMap -> B.ByteString -> FromServerMessage decodeFromServerMsg reqMap bytes = - case HM.lookup "method" fromJust (decode bytes) of + case HM.lookup "method" (fromJust $ decode bytes :: Object) of Just methodStr -> case fromJSON methodStr of Success method -> case method of -- We can work out the type of the message