Win32 2.10.1.1 → 2.11.0.0
raw patch · 4 files changed
+15/−15 lines, 4 filesdep −bytestringPVP ok
version bump matches the API change (PVP)
Dependencies removed: bytestring
API changes (from Hackage documentation)
- System.Win32.FileMapping: mapFileBs :: FilePath -> IO ByteString
Files
- System/Win32/FileMapping.hsc +4/−8
- System/Win32/Types.hsc +5/−5
- Win32.cabal +2/−2
- changelog.md +4/−0
System/Win32/FileMapping.hsc view
@@ -1,4 +1,8 @@+#if __GLASGOW_HASKELL__ >= 709+{-# LANGUAGE Safe #-}+#else {-# LANGUAGE Trustworthy #-}+#endif ----------------------------------------------------------------------------- -- | -- Module : System.Win32.FileMapping@@ -22,8 +26,6 @@ import System.Win32.Info import Control.Exception ( mask_, bracket )-import Data.ByteString ( ByteString )-import Data.ByteString.Internal ( fromForeignPtr ) import Foreign ( Ptr, nullPtr, plusPtr, maybeWith, FunPtr , ForeignPtr, newForeignPtr ) import Foreign.C.Types (CUIntPtr(..))@@ -52,12 +54,6 @@ ptr <- mapViewOfFile fm fILE_MAP_READ 0 0 newForeignPtr c_UnmapViewOfFileFinaliser ptr return (fp, fromIntegral $ bhfiSize fi)---- | As mapFile, but returns ByteString-mapFileBs :: FilePath -> IO ByteString-mapFileBs p = do- (fp,i) <- mapFile p- return $ fromForeignPtr fp 0 i data MappedObject = MappedObject HANDLE HANDLE FileMapAccess
System/Win32/Types.hsc view
@@ -277,13 +277,13 @@ -- Originally authored by Max Bolingbroke in the ansi-terminal library withHandleToHANDLE :: Handle -> (HANDLE -> IO a) -> IO a-##if defined(__IO_MANAGER_WINIO__)+#if defined(__IO_MANAGER_WINIO__) withHandleToHANDLE = withHandleToHANDLEPosix <!> withHandleToHANDLENative-##else+#else withHandleToHANDLE = withHandleToHANDLEPosix-##endif+#endif -##if defined(__IO_MANAGER_WINIO__)+#if defined(__IO_MANAGER_WINIO__) withHandleToHANDLENative :: Handle -> (HANDLE -> IO a) -> IO a withHandleToHANDLENative haskell_handle action = -- Create a stable pointer to the Handle. This prevents the garbage collector@@ -293,7 +293,7 @@ windows_handle <- handleToHANDLE haskell_handle -- Do what the user originally wanted action windows_handle-##endif+#endif withHandleToHANDLEPosix :: Handle -> (HANDLE -> IO a) -> IO a withHandleToHANDLEPosix haskell_handle action =
Win32.cabal view
@@ -1,5 +1,5 @@ name: Win32-version: 2.10.1.1+version: 2.11.0.0 license: BSD3 license-file: LICENSE author: Alastair Reid, shelarcy, Tamar Christina@@ -28,7 +28,7 @@ build-depends: unbuildable<0 buildable: False - build-depends: base >= 4.5 && < 5, bytestring, filepath+ build-depends: base >= 4.5 && < 5, filepath -- Black list hsc2hs 0.68.6 which is horribly broken. build-tool-depends: hsc2hs:hsc2hs > 0 && < 0.68.6 || > 0.68.6 ghc-options: -Wall -fno-warn-name-shadowing
changelog.md view
@@ -1,5 +1,9 @@ # Changelog for [`Win32` package](http://hackage.haskell.org/package/Win32) +## 2.11.0.0 January 2021++* Remove function `mapFileBs`.+ ## 2.10.1.0 October 2020 * Add `System.Win32.Event` module