[commit: packages/Win32] ghc-head: Partial support for base 4.6 (68955ee)

git at git.haskell.org git at git.haskell.org
Tue Mar 18 10:16:09 UTC 2014


Repository : ssh://git@git.haskell.org/Win32

On branch  : ghc-head
Link       : http://git.haskell.org/packages/Win32.git/commitdiff/68955ee0850c749c81f5123f72ca57a9189bbe74

>---------------------------------------------------------------

commit 68955ee0850c749c81f5123f72ca57a9189bbe74
Author: Bryan O'Sullivan <bos at serpentine.com>
Date:   Tue Feb 4 12:14:11 2014 -0800

    Partial support for base 4.6


>---------------------------------------------------------------

68955ee0850c749c81f5123f72ca57a9189bbe74
 System/Win32/Types.hs |   30 +++++++++++++++++++++++-------
 Win32.cabal           |    2 +-
 2 files changed, 24 insertions(+), 8 deletions(-)

diff --git a/System/Win32/Types.hs b/System/Win32/Types.hs
old mode 100644
new mode 100755
index 5b15b93..359e42f
--- a/System/Win32/Types.hs
+++ b/System/Win32/Types.hs
@@ -20,14 +20,30 @@ module System.Win32.Types
 	, nullPtr
 	) where
 
-import Data.Maybe
-import Foreign
-import Foreign.C
-import Control.Exception
-import System.IO.Error
-import System.IO.Unsafe
-import Data.Char
+import Control.Exception (throw)
+import Data.Bits (shiftL, shiftR, (.|.), (.&.))
+import Data.Char (isSpace)
+import Data.Int (Int32, Int64)
+import Data.Maybe (fromMaybe)
+import Data.Word (Word, Word8, Word16, Word32, Word64)
+import Foreign.C.Error (getErrno, errnoToIOError)
+import Foreign.C.String (newCWString, withCWStringLen)
+import Foreign.C.String (peekCWString, peekCWStringLen, withCWString)
+import Foreign.C.Types (CChar, CUChar, CWchar)
+import Foreign.ForeignPtr (ForeignPtr, newForeignPtr, newForeignPtr_)
+import Foreign.Ptr (FunPtr, Ptr, nullPtr)
 import Numeric (showHex)
+import System.IO.Error (ioeSetErrorString)
+import System.IO.Unsafe (unsafePerformIO)
+
+#if MIN_VERSION_base(4,7,0)
+import Data.Bits (finiteBitSize)
+#else
+import Data.Bits (Bits, bitSize)
+
+finiteBitSize :: (Bits a) => a -> Int
+finiteBitSize = bitSize
+#endif
 
 #include "windows_cconv.h"
 
diff --git a/Win32.cabal b/Win32.cabal
old mode 100644
new mode 100755
index 00e0c25..4edf5b8
--- a/Win32.cabal
+++ b/Win32.cabal
@@ -17,7 +17,7 @@ extra-source-files:
 	include/Win32Aux.h include/win32debug.h include/windows_cconv.h
 
 Library
-    build-depends:	base >= 4.7 && < 5, bytestring
+    build-depends:	base >= 4.6 && < 5, bytestring
     ghc-options:    -Wall -fno-warn-name-shadowing
     cc-options:     -fno-strict-aliasing
     exposed-modules:



More information about the ghc-commits mailing list