safer-file-handles-bytestring 0.2 → 0.3
raw patch · 6 files changed
+45/−23 lines, 6 filesdep ~basedep ~explicit-iomodes-bytestringdep ~regionsPVP ok
version bump matches the API change (PVP)
Dependency ranges changed: base, explicit-iomodes-bytestring, regions
API changes (from Hackage documentation)
- Data.ByteString.SaferFileHandles: hPutStrLn :: (FileHandle handle, WriteModes ioMode, AncestorRegion pr cr, MonadIO cr) => handle ioMode pr -> ByteString -> cr ()
+ Data.ByteString.SaferFileHandles: hGetSome :: (FileHandle handle, ReadModes ioMode, AncestorRegion pr cr, MonadIO cr) => handle ioMode pr -> Int -> cr ByteString
+ Data.ByteString.SaferFileHandles: hPutNonBlocking :: (FileHandle handle, WriteModes ioMode, AncestorRegion pr cr, MonadIO cr) => handle ioMode pr -> ByteString -> cr ByteString
Files
- Data/ByteString/Char8/SaferFileHandles.hs +1/−1
- Data/ByteString/Lazy/Char8/SaferFileHandles.hs +1/−1
- Data/ByteString/Lazy/SaferFileHandles.hs +1/−1
- Data/ByteString/SaferFileHandles.hs +32/−12
- LICENSE +1/−1
- safer-file-handles-bytestring.cabal +9/−7
Data/ByteString/Char8/SaferFileHandles.hs view
@@ -3,7 +3,7 @@ ------------------------------------------------------------------------------- -- | -- Module : Data.ByteString.SaferFileHandles--- Copyright : (c) 2010 Bas van Dijk+-- Copyright : (c) 2010-2011 Bas van Dijk -- License : BSD3 (see the file LICENSE) -- Maintainer : Bas van Dijk <v.dijk.bas@gmail.com> --
Data/ByteString/Lazy/Char8/SaferFileHandles.hs view
@@ -3,7 +3,7 @@ ------------------------------------------------------------------------------- -- | -- Module : Data.ByteString.SaferFileHandles--- Copyright : (c) 2010 Bas van Dijk+-- Copyright : (c) 2010-2011 Bas van Dijk -- License : BSD3 (see the file LICENSE) -- Maintainer : Bas van Dijk <v.dijk.bas@gmail.com> --
Data/ByteString/Lazy/SaferFileHandles.hs view
@@ -3,7 +3,7 @@ ------------------------------------------------------------------------------- -- | -- Module : Data.ByteString.SaferFileHandles--- Copyright : (c) 2010 Bas van Dijk+-- Copyright : (c) 2010-2011 Bas van Dijk -- License : BSD3 (see the file LICENSE) -- Maintainer : Bas van Dijk <v.dijk.bas@gmail.com> --
Data/ByteString/SaferFileHandles.hs view
@@ -1,9 +1,9 @@-{-# LANGUAGE UnicodeSyntax, NoImplicitPrelude #-}+{-# LANGUAGE CPP, UnicodeSyntax, NoImplicitPrelude #-} ------------------------------------------------------------------------------- -- | -- Module : Data.ByteString.SaferFileHandles--- Copyright : (c) 2010 Bas van Dijk+-- Copyright : (c) 2010-2011 Bas van Dijk -- License : BSD3 (see the file LICENSE) -- Maintainer : Bas van Dijk <v.dijk.bas@gmail.com> --@@ -15,11 +15,16 @@ ( hGetLine , hGetContents , hGet+#if MIN_VERSION_explicit_iomodes_bytestring(0,2,0)+ , hGetSome+#endif , hGetNonBlocking , hPut+#if MIN_VERSION_explicit_iomodes_bytestring(0,2,0)+ , hPutNonBlocking+#endif , hPutStr- , hPutStrLn ) where -------------------------------------------------------------------------------@@ -42,11 +47,16 @@ import qualified Data.ByteString.ExplicitIOModes as E ( hGetLine , hGetContents , hGet+#if MIN_VERSION_explicit_iomodes_bytestring(0,2,0)+ , hGetSome+#endif , hGetNonBlocking , hPut+#if MIN_VERSION_explicit_iomodes_bytestring(0,2,0)+ , hPutNonBlocking+#endif , hPutStr- , hPutStrLn ) -- from safer-file-handles:@@ -79,6 +89,15 @@ ⇒ handle ioMode pr → Int → cr B.ByteString hGet = wrap2 E.hGet +#if MIN_VERSION_explicit_iomodes_bytestring(0,2,0)+-- | Wraps @Data.ByteString.@'B.hGetSome'.+hGetSome ∷ ( FileHandle handle, ReadModes ioMode+ , pr `AncestorRegion` cr, MonadIO cr+ )+ ⇒ handle ioMode pr → Int → cr B.ByteString+hGetSome = wrap2 E.hGetSome+#endif+ -- | Wraps: @Data.ByteString.'B.hGetNonBlocking'@. hGetNonBlocking ∷ ( FileHandle handle, ReadModes ioMode , pr `AncestorRegion` cr, MonadIO cr@@ -93,19 +112,20 @@ ⇒ handle ioMode pr → B.ByteString → cr () hPut = wrap2 E.hPut +#if MIN_VERSION_explicit_iomodes_bytestring(0,2,0)+-- | Wraps @Data.ByteString.@'B.hPutNonBlocking'.+hPutNonBlocking ∷ ( FileHandle handle, WriteModes ioMode+ , pr `AncestorRegion` cr, MonadIO cr+ )+ ⇒ handle ioMode pr → B.ByteString → cr B.ByteString+hPutNonBlocking = wrap2 E.hPutNonBlocking+#endif+ -- | Wraps: @Data.ByteString.'B.hPutStr'@. hPutStr ∷ ( FileHandle handle, WriteModes ioMode , pr `AncestorRegion` cr, MonadIO cr ) ⇒ handle ioMode pr → B.ByteString → cr () hPutStr = wrap2 E.hPutStr---- | Wraps: @Data.ByteString.'B.hPutStrLn'@.-hPutStrLn ∷ ( FileHandle handle, WriteModes ioMode- , pr `AncestorRegion` cr, MonadIO cr- )- ⇒ handle ioMode pr → B.ByteString → cr ()-hPutStrLn = wrap2 E.hPutStrLn- -- The End ---------------------------------------------------------------------
LICENSE view
@@ -1,4 +1,4 @@-Copyright (c) 2010 Bas van Dijk+Copyright (c) 2010-2011 Bas van Dijk All rights reserved.
safer-file-handles-bytestring.cabal view
@@ -1,28 +1,30 @@ name: safer-file-handles-bytestring-version: 0.2+version: 0.3 cabal-version: >=1.6 build-type: Simple license: BSD3 license-file: LICENSE-copyright: 2010 Bas van Dijk+copyright: 2010-2011 Bas van Dijk author: Bas van Dijk maintainer: Bas van Dijk <v.dijk.bas@gmail.com>+homepage: https://github.com/basvandijk/safer-file-handles-bytestring/+bug-reports: https://github.com/basvandijk/safer-file-handles-bytestring/issues stability: experimental category: System, Monadic Regions synopsis: Extends safer-file-handles with ByteString operations description: Extends @safer-file-handles@ with @ByteString@ operations source-repository head- Type: darcs- Location: http://code.haskell.org/~basvandijk/code/safer-file-handles-bytestring+ Type: git+ Location: git://github.com/basvandijk/safer-file-handles-bytestring.git Library GHC-Options: -Wall- build-depends: base >= 4 && < 4.4+ build-depends: base >= 4 && < 4.5 , bytestring >= 0.9 && < 0.10- , regions >= 0.9 && < 0.10+ , regions >= 0.9 && < 0.11 , transformers >= 0.2 && < 0.3- , explicit-iomodes-bytestring >= 0.1 && < 0.2+ , explicit-iomodes-bytestring >= 0.2 && < 0.3 , safer-file-handles >= 0.10 && < 0.11 exposed-modules: Data.ByteString.SaferFileHandles Data.ByteString.Char8.SaferFileHandles