-{-# LANGUAGE CPP #-}
+{-# LANGUAGE CPP, OverloadedStrings #-}
-- For some reason ghc warns about not using
-- Control.Monad.IO.Class but it's needed for
-- MonadIO
import Data.Maybe
import System.IO
+import Language.Haskell.LSP.Types
#if MIN_VERSION_process(1,6,3)
-- We have to hide cleanupProcess for process-1.6.3.0
_ -> return Nothing
#endif
-cleanupRunningProcess :: (Maybe Handle, Maybe Handle, Maybe Handle, ProcessHandle) -> IO ()
-cleanupRunningProcess p@(_, _, _, ph) =
- getProcessExitCode ph >>= maybe (cleanupProcess p) (const $ return ())
-
cleanupProcess
:: (Maybe Handle, Maybe Handle, Maybe Handle, ProcessHandle) -> IO ()
return ()
where ignoreSigPipe = ignoreIOError ResourceVanished ePIPE
- ignorePermDenied = ignoreIOError PermissionDenied ePERM
+ ignorePermDenied = ignoreIOError PermissionDenied eACCES
ignoreIOError :: IOErrorType -> Errno -> IO () -> IO ()
ignoreIOError ioErrorType errno =
(\(m_in, m_out, m_err, ph) -> action m_in m_out m_err ph)
#endif
+
+
+lspTestClientInfo :: ClientInfo
+lspTestClientInfo = ClientInfo "lsp-test" (Just CURRENT_PACKAGE_VERSION)