Merge pull request #36 from alanz/az-hie-bios 0.5.2.2
authorLuke Lau <luke_lau@icloud.com>
Thu, 9 May 2019 10:01:03 +0000 (11:01 +0100)
committerGitHub <noreply@github.com>
Thu, 9 May 2019 10:01:03 +0000 (11:01 +0100)
Adapt to new VirtualFile structure

lsp-test.cabal
src/Language/Haskell/LSP/Test.hs
src/Language/Haskell/LSP/Test/Session.hs
stack.yaml

index 799754011adb67d52d7d2c1da4d29030f55be570..996950091a65f83c806ca5e2d73f6699280095fe 100644 (file)
@@ -1,5 +1,5 @@
 name:                lsp-test
-version:             0.5.2.1
+version:             0.5.2.2
 synopsis:            Functional test framework for LSP servers.
 description:
   A test framework for writing tests against
@@ -36,7 +36,7 @@ library
                      , parser-combinators:Control.Applicative.Combinators
   default-language:    Haskell2010
   build-depends:       base >= 4.10 && < 5
-                     , haskell-lsp == 0.12.*
+                     , haskell-lsp >= 0.12.1 && < 0.13
                      , aeson
                      , aeson-pretty
                      , ansi-terminal
@@ -78,7 +78,7 @@ test-suite tests
   build-depends:       base >= 4.10 && < 5
                      , hspec
                      , lens
-                     , haskell-lsp == 0.12.*
+                     , haskell-lsp >= 0.12.1 && < 0.13
                      , lsp-test
                      , data-default
                      , aeson
index 696f84aa4df05bae70d411feb75675de2f2a076e..6156b003dd53876406a592e4278dbe88cfcd98f8 100644 (file)
@@ -436,7 +436,7 @@ getVersionedDoc (TextDocumentIdentifier uri) = do
   fs <- vfs <$> get
   let ver =
         case fs Map.!? uri of
-          Just (VirtualFile v _) -> Just v
+          Just (VirtualFile v _ _) -> Just v
           _ -> Nothing
   return (VersionedTextDocumentIdentifier uri ver)
 
index 291a3e0bcaa990327988f2bcbd9df6554a63f50f..a3ba35b3a1a46f723d4ca0fce59775991680c862 100644 (file)
@@ -256,7 +256,7 @@ updateState (ReqApplyWorkspaceEdit r) = do
   forM_ bumpedVersions $ \(VersionedTextDocumentIdentifier uri v) ->
     modify $ \s ->
       let oldVFS = vfs s
-          update (VirtualFile oldV t) = VirtualFile (fromMaybe oldV v) t
+          update (VirtualFile oldV t mf) = VirtualFile (fromMaybe oldV v) t mf
           newVFS = Map.adjust update uri oldVFS
       in s { vfs = newVFS }
 
index 90c312289113746798e5126be069fd90ea39be40..5045e7fa2fca455b6446aa92ceb5c9fbd68fcd6e 100644 (file)
@@ -3,6 +3,6 @@ packages:
   - .
 
 extra-deps:
-  - haskell-lsp-0.12.0.0
-  - haskell-lsp-types-0.12.0.0
-  - rope-utf16-splay-0.2.0.0
+  - haskell-lsp-0.12.1.0
+  - haskell-lsp-types-0.12.1.0
+  - rope-utf16-splay-0.3.1.0