Fix up
authorLuke Lau <luke_lau@icloud.com>
Mon, 4 Jun 2018 23:52:22 +0000 (19:52 -0400)
committerLuke Lau <luke_lau@icloud.com>
Mon, 4 Jun 2018 23:52:22 +0000 (19:52 -0400)
dist/cabal-config-flags [new file with mode: 0644]
src/Language/Haskell/LSP/Test/Files.hs
src/Language/Haskell/LSP/Test/Parsing.hs
stack.yaml

diff --git a/dist/cabal-config-flags b/dist/cabal-config-flags
new file mode 100644 (file)
index 0000000..7c101f6
Binary files /dev/null and b/dist/cabal-config-flags differ
index 48390940a990419aa7024fe0f65f778200b3ba47..59d51cef5a078212749787c9d6f5b41f089112f0 100644 (file)
@@ -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
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
index 440d02c9e42f41281329032ee74420b5955e23e1..35cf5b183167fa61c499ef899dad40b9716e7e44 100644 (file)
@@ -1,4 +1,4 @@
-resolver: nightly-2018-06-01
+resolver: nightly-2018-05-30
 packages:
   - .