From: Luke Lau Date: Mon, 4 Jun 2018 23:52:22 +0000 (-0400) Subject: Fix up X-Git-Tag: 0.1.0.0~96 X-Git-Url: http://git.lukelau.me/?p=lsp-test.git;a=commitdiff_plain;h=bd554ce2292b667f7870e9643a1107a81063a596 Fix up --- diff --git a/dist/cabal-config-flags b/dist/cabal-config-flags new file mode 100644 index 0000000..7c101f6 Binary files /dev/null and b/dist/cabal-config-flags differ diff --git a/src/Language/Haskell/LSP/Test/Files.hs b/src/Language/Haskell/LSP/Test/Files.hs index 4839094..59d51ce 100644 --- a/src/Language/Haskell/LSP/Test/Files.hs +++ b/src/Language/Haskell/LSP/Test/Files.hs @@ -44,7 +44,7 @@ mapUris f event = FromServer t msg -> FromServer t (fromServerMsg msg) where - --TODO: Handle all other URLs that might need swapped + --TODO: Handle all other URIs that might need swapped fromClientMsg (NotDidOpenTextDocument n) = NotDidOpenTextDocument $ swapUri (params . textDocument) n fromClientMsg (NotDidChangeTextDocument n) = NotDidChangeTextDocument $ swapUri (params . textDocument) n fromClientMsg (NotWillSaveTextDocument n) = NotWillSaveTextDocument $ swapUri (params . textDocument) n diff --git a/src/Language/Haskell/LSP/Test/Parsing.hs b/src/Language/Haskell/LSP/Test/Parsing.hs index 14db732..11df23e 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 diff --git a/stack.yaml b/stack.yaml index 440d02c..35cf5b1 100644 --- a/stack.yaml +++ b/stack.yaml @@ -1,4 +1,4 @@ -resolver: nightly-2018-06-01 +resolver: nightly-2018-05-30 packages: - .