projects
/
opengl.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Update to haskell-lsp-0.7
[opengl.git]
/
src
/
Language
/
Haskell
/
LSP
/
Test.hs
diff --git
a/src/Language/Haskell/LSP/Test.hs
b/src/Language/Haskell/LSP/Test.hs
index ec290ff9833b0d79af1e861f825d7850a407caf3..b7a746ed26f4999e6b86c73d6a1ec74c01c3ba73 100644
(file)
--- a/
src/Language/Haskell/LSP/Test.hs
+++ b/
src/Language/Haskell/LSP/Test.hs
@@
-23,7
+23,7
@@
module Language.Haskell.LSP.Test
, runSessionWithConfig
, SessionConfig(..)
, defaultConfig
, runSessionWithConfig
, SessionConfig(..)
, defaultConfig
- ,
module Language.Haskell.LSP.Types.Capabilitie
s
+ ,
C.fullCap
s
-- ** Exceptions
, module Language.Haskell.LSP.Test.Exceptions
, withTimeout
-- ** Exceptions
, module Language.Haskell.LSP.Test.Exceptions
, withTimeout
@@
-91,9
+91,10
@@
import Data.Default
import qualified Data.HashMap.Strict as HashMap
import qualified Data.Map as Map
import Data.Maybe
import qualified Data.HashMap.Strict as HashMap
import qualified Data.Map as Map
import Data.Maybe
-import Language.Haskell.LSP.Types hiding (id, capabilities, message)
+import Language.Haskell.LSP.Types hiding
+ (id, capabilities, message, executeCommand, applyEdit, rename)
import qualified Language.Haskell.LSP.Types as LSP
import qualified Language.Haskell.LSP.Types as LSP
-import
Language.Haskell.LSP.Types.Capabilities
+import
qualified Language.Haskell.LSP.Types.Capabilities as C
import Language.Haskell.LSP.Messages
import Language.Haskell.LSP.VFS
import Language.Haskell.LSP.Test.Compat
import Language.Haskell.LSP.Messages
import Language.Haskell.LSP.VFS
import Language.Haskell.LSP.Test.Compat
@@
-116,7
+117,7
@@
import qualified Yi.Rope as Rope
-- > params = TextDocumentPositionParams doc
-- > hover <- request TextDocumentHover params
runSession :: String -- ^ The command to run the server.
-- > params = TextDocumentPositionParams doc
-- > hover <- request TextDocumentHover params
runSession :: String -- ^ The command to run the server.
- -> ClientCapabilities -- ^ The capabilities that the client should declare.
+ -> C
.C
lientCapabilities -- ^ The capabilities that the client should declare.
-> FilePath -- ^ The filepath to the root directory for the session.
-> Session a -- ^ The session to run.
-> IO a
-> FilePath -- ^ The filepath to the root directory for the session.
-> Session a -- ^ The session to run.
-> IO a
@@
-125,7
+126,7
@@
runSession = runSessionWithConfig def
-- | Starts a new sesion with a custom configuration.
runSessionWithConfig :: SessionConfig -- ^ Configuration options for the session.
-> String -- ^ The command to run the server.
-- | Starts a new sesion with a custom configuration.
runSessionWithConfig :: SessionConfig -- ^ Configuration options for the session.
-> String -- ^ The command to run the server.
- -> ClientCapabilities -- ^ The capabilities that the client should declare.
+ -> C
.C
lientCapabilities -- ^ The capabilities that the client should declare.
-> FilePath -- ^ The filepath to the root directory for the session.
-> Session a -- ^ The session to run.
-> IO a
-> FilePath -- ^ The filepath to the root directory for the session.
-> Session a -- ^ The session to run.
-> IO a
@@
-139,6
+140,7
@@
runSessionWithConfig config serverExe caps rootDir session = do
Nothing
caps
(Just TraceOff)
Nothing
caps
(Just TraceOff)
+ Nothing
withServer serverExe (logStdErr config) $ \serverIn serverOut _ ->
runSessionWithHandles serverIn serverOut listenServer config caps rootDir $ do
withServer serverExe (logStdErr config) $ \serverIn serverOut _ ->
runSessionWithHandles serverIn serverOut listenServer config caps rootDir $ do
@@
-441,9
+443,9
@@
applyEdit doc edit = do
caps <- asks sessionCapabilities
let supportsDocChanges = fromMaybe False $ do
caps <- asks sessionCapabilities
let supportsDocChanges = fromMaybe False $ do
- let ClientCapabilities mWorkspace _ _ = caps
- WorkspaceClientCapabilities _ mEdit _ _ _ _ _ _ <- mWorkspace
- WorkspaceEditClientCapabilities mDocChanges <- mEdit
+ let C
.C
lientCapabilities mWorkspace _ _ = caps
+
C.
WorkspaceClientCapabilities _ mEdit _ _ _ _ _ _ <- mWorkspace
+
C.
WorkspaceEditClientCapabilities mDocChanges <- mEdit
mDocChanges
let wEdit = if supportsDocChanges
mDocChanges
let wEdit = if supportsDocChanges