From: Luke Lau Date: Tue, 1 Sep 2020 16:08:30 +0000 (+0100) Subject: Add haddock to runSessionWithHandles X-Git-Tag: 0.13.0.0~7^2~15 X-Git-Url: https://git.lukelau.me/?p=lsp-test.git;a=commitdiff_plain;h=74c491fb3c87a385d03edac920d22793ecb981c0 Add haddock to runSessionWithHandles --- diff --git a/src/Language/Haskell/LSP/Test.hs b/src/Language/Haskell/LSP/Test.hs index 9866be9..7f13a44 100644 --- a/src/Language/Haskell/LSP/Test.hs +++ b/src/Language/Haskell/LSP/Test.hs @@ -155,7 +155,16 @@ runSessionWithConfig config' serverExe caps rootDir session = do withServer serverExe (logStdErr config) $ \serverIn serverOut serverProc -> runSessionWithHandles' (Just serverProc) serverIn serverOut config caps rootDir session - +-- | Starts a new session, using the specified handles to communicate with the +-- server. You can use this to host the server within the same process. +-- An example with haskell-lsp might look like: +-- +-- > (hinRead, hinWrite) <- createPipe +-- > (houtRead, houtWrite) <- createPipe +-- > +-- > forkIO $ void $ runWithHandles hinRead houtWrite initCallbacks handlers def +-- > Test.runSessionWithHandles hinWrite houtRead defaultConfig fullCaps "." $ do +-- > -- ... runSessionWithHandles :: Handle -- ^ The input handle -> Handle -- ^ The output handle -> SessionConfig