X-Git-Url: http://git.lukelau.me/?a=blobdiff_plain;f=src%2FLanguage%2FHaskell%2FLSP%2FTest%2FCompat.hs;h=9467a322597cc75ed0d16c1f4010e9cb537b6cd0;hb=2ddc33759433fc19185140227a232a2cf8017de9;hp=6b018cce5a526e7e111d459d3bd3b68d3d21ed09;hpb=502c8dc3ff63383487536922176330a3f459a462;p=lsp-test.git diff --git a/src/Language/Haskell/LSP/Test/Compat.hs b/src/Language/Haskell/LSP/Test/Compat.hs index 6b018cc..9467a32 100644 --- a/src/Language/Haskell/LSP/Test/Compat.hs +++ b/src/Language/Haskell/LSP/Test/Compat.hs @@ -5,9 +5,6 @@ {-# OPTIONS_GHC -Wunused-imports #-} module Language.Haskell.LSP.Test.Compat where -import Control.Concurrent.Chan -import Control.Monad.IO.Class -import Data.Conduit import Data.Maybe #if MIN_VERSION_process(1,6,3) @@ -39,7 +36,11 @@ getProcessID p = fromIntegral . fromJust <$> getProcessID' p #if MIN_VERSION_process(1,6,3) getProcessID' = System.Process.getPid #else +#if MIN_VERSION_process(1,6,0) getProcessID' (ProcessHandle mh _ _) = do +#else + getProcessID' (ProcessHandle mh _) = do +#endif p_ <- readMVar mh case p_ of #ifdef mingw32_HOST_OS @@ -51,13 +52,3 @@ getProcessID p = fromIntegral . fromJust <$> getProcessID' p #endif _ -> return Nothing #endif - -#if MIN_VERSION_conduit(1,3,0) -chanSource :: MonadIO m => Chan o -> ConduitT i o m b -#else -chanSource :: MonadIO m => Chan o -> ConduitM i o m b -#endif -chanSource c = do - x <- liftIO $ readChan c - yield x - chanSource c