Commit ad1a5c88 authored by Herbert Valerio Riedel's avatar Herbert Valerio Riedel 🕺
Browse files

Make compatible with GHC 7.2/7.4/7.6 again

Supporting GHC 7.2 again was just a single `#ifdef`. Otoh, supporting
GHC 7.0 would require reverting part of d10b168a

.

This also updates the build-dependancy version constraints to reflect
the current reality. The code is `-Wall` clean for GHC 7.4 and later.
Signed-off-by: Herbert Valerio Riedel's avatarHerbert Valerio Riedel <hvr@gnu.org>
parent fae91ea8
......@@ -52,11 +52,14 @@ import System.IO
#endif
#endif
import System.IO.Unsafe
import Control.Concurrent
import Control.Exception
import Data.Bits
import Foreign.C
import Foreign
import Foreign.Marshal
import Foreign.Ptr
import Foreign.Storable
import System.IO.Unsafe
# ifdef __GLASGOW_HASKELL__
......@@ -411,7 +414,11 @@ pfdToHandle pfd mode = do
False {-is_socket-}
False {-non-blocking-}
fD' <- FD.setNonBlockingMode fD True -- see #3316
#if __GLASGOW_HASKELL__ >= 704
enc <- getLocaleEncoding
#else
let enc = localeEncoding
#endif
mkHandleFromFD fD' fd_type filepath mode False {-is_socket-} (Just enc)
#ifndef __HUGS__
......
......@@ -48,10 +48,11 @@ library
build-depends: Win32 >=2.2.0.0
extra-libraries: kernel32
else
build-depends: unix
build-depends: unix >= 2.5 && < 2.8
build-depends: base >= 4.5 && < 5,
directory >= 1.0 && < 1.3,
filepath >= 1.1 && < 1.4,
deepseq >= 1.1 && < 1.4
ghc-options: -Wall
build-depends: base >= 4.4 && < 5,
directory >= 1.1 && < 1.3,
filepath >= 1.2 && < 1.4,
deepseq >= 1.1 && < 1.4
\ No newline at end of file
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment