diff options
author | Herbert Valerio Riedel <hvr@gnu.org> | 2016-01-30 23:14:23 +0100 |
---|---|---|
committer | Herbert Valerio Riedel <hvr@gnu.org> | 2016-01-31 00:19:53 +0100 |
commit | 2a49ad87b7b5d92bf62035d410c4bcde817d30a6 (patch) | |
tree | 6cba2a97efac7cea6153e6dd10bdc04cd6e669c6 /System/Posix/IO | |
parent | 716eccb11f324abc120c24ce0344b7094f1aa435 (diff) |
Drop redundant __GLASGOW_HASKELL__ conditionals for GHC>=7.4
Diffstat (limited to 'System/Posix/IO')
-rw-r--r-- | System/Posix/IO/ByteString.hsc | 2 | ||||
-rw-r--r-- | System/Posix/IO/Common.hsc | 8 |
2 files changed, 3 insertions, 7 deletions
diff --git a/System/Posix/IO/ByteString.hsc b/System/Posix/IO/ByteString.hsc index b8bc87a..d387f0e 100644 --- a/System/Posix/IO/ByteString.hsc +++ b/System/Posix/IO/ByteString.hsc @@ -1,6 +1,6 @@ #if __GLASGOW_HASKELL__ >= 709 {-# LANGUAGE Safe #-} -#elif __GLASGOW_HASKELL__ >= 703 +#else {-# LANGUAGE Trustworthy #-} #endif ----------------------------------------------------------------------------- diff --git a/System/Posix/IO/Common.hsc b/System/Posix/IO/Common.hsc index abcd19b..8f8ddb9 100644 --- a/System/Posix/IO/Common.hsc +++ b/System/Posix/IO/Common.hsc @@ -1,7 +1,7 @@ {-# LANGUAGE NondecreasingIndentation, RecordWildCards #-} #if __GLASGOW_HASKELL__ >= 709 {-# LANGUAGE Safe #-} -#elif __GLASGOW_HASKELL__ >= 703 +#else {-# LANGUAGE Trustworthy #-} #endif @@ -70,14 +70,12 @@ import qualified System.Posix.Internals as Base import Foreign import Foreign.C -#ifdef __GLASGOW_HASKELL__ import GHC.IO.Handle.Internals import GHC.IO.Handle.Types import qualified GHC.IO.FD as FD import qualified GHC.IO.Handle.FD as FD import GHC.IO.Exception import Data.Typeable (cast) -#endif #include "HsUnix.h" @@ -206,8 +204,8 @@ handleToFd :: Handle -> IO Fd -- | Converts an 'Fd' into a 'Handle' that can be used with the -- standard Haskell IO library (see "System.IO"). fdToHandle :: Fd -> IO Handle +fdToHandle fd = FD.fdToHandle (fromIntegral fd) -#ifdef __GLASGOW_HASKELL__ handleToFd h@(FileHandle _ m) = do withHandle' "handleToFd" h m $ handleToFd' h handleToFd h@(DuplexHandle _ r w) = do @@ -231,8 +229,6 @@ handleToFd' h h_@Handle__{haType=_,..} = do FD.release fd return (Handle__{haType=ClosedHandle,..}, Fd (FD.fdFD fd)) -fdToHandle fd = FD.fdToHandle (fromIntegral fd) -#endif -- ----------------------------------------------------------------------------- -- Fd options |