Decode responses to the correct type
[lsp-test.git] / src / Compat.hs
1 {-# LANGUAGE CPP #-}
2
3 module Compat where
4
5
6 #ifdef mingw32_HOST_OS
7
8 import qualified System.Win32.Process as P (getCurrentProcessId)
9 getProcessID :: IO Int
10 getProcessID = fromIntegral <$> P.getCurrentProcessId
11
12 #else
13
14 import qualified System.Posix.Process as P (getProcessID)
15 getProcessID :: IO Int
16 getProcessID = fromIntegral <$> P.getProcessID
17
18 #endif