2 module Language.Haskell.LSP.Test.Compat where
4 import Control.Concurrent.Chan
5 import Control.Monad.IO.Class
10 import qualified System.Win32.Process as P (getCurrentProcessId)
11 getProcessID :: IO Int
12 getProcessID = fromIntegral <$> P.getCurrentProcessId
16 import qualified System.Posix.Process as P (getProcessID)
17 getProcessID :: IO Int
18 getProcessID = fromIntegral <$> P.getProcessID
22 #if MIN_VERSION_conduit(1,3,0)
23 chanSource :: MonadIO m => Chan o -> ConduitT i o m b
25 chanSource :: MonadIO m => Chan o -> ConduitM i o m b
28 x <- liftIO $ readChan c