Fix up
[lsp-test.git] / src / Language / Haskell / LSP / Test / Parsing.hs
index 14db732e5990c25367fe9ca9c79e78278081255c..11df23efb88c9724b53fa8ca5076f8f3a7f1919a 100644 (file)
@@ -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