From bd554ce2292b667f7870e9643a1107a81063a596 Mon Sep 17 00:00:00 2001 From: Luke Lau Date: Mon, 4 Jun 2018 19:52:22 -0400 Subject: [PATCH] Fix up --- dist/cabal-config-flags | Bin 0 -> 125 bytes src/Language/Haskell/LSP/Test/Files.hs | 2 +- src/Language/Haskell/LSP/Test/Parsing.hs | 3 +-- stack.yaml | 2 +- 4 files changed, 3 insertions(+), 4 deletions(-) create mode 100644 dist/cabal-config-flags diff --git a/dist/cabal-config-flags b/dist/cabal-config-flags new file mode 100644 index 0000000000000000000000000000000000000000..7c101f6fae94a20e82804b64d3d4523d73b15e0e GIT binary patch literal 125 zcmZvVQ4WA03`4!pBp!fccz}Tuh*QV__4v;C>rb1sFD<}H;<B4FDl})grW}+nTwO tRKtBEGkSE$+I7v;=x%}v<^Tm-{9%nthk{pX@tw8bbj_@PcF#*^lm{f#Dpvpi literal 0 HcmV?d00001 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: - . -- 2.30.2