diff --git a/Data/ByteString/Char8/SaferFileHandles.hs b/Data/ByteString/Char8/SaferFileHandles.hs
new file mode 100644
--- /dev/null
+++ b/Data/ByteString/Char8/SaferFileHandles.hs
@@ -0,0 +1,100 @@
+{-# LANGUAGE UnicodeSyntax, NoImplicitPrelude #-}
+
+-------------------------------------------------------------------------------
+-- |
+-- Module      :  Data.ByteString.SaferFileHandles
+-- Copyright   :  (c) 2010 Bas van Dijk
+-- License     :  BSD3 (see the file LICENSE)
+-- Maintainer  :  Bas van Dijk <v.dijk.bas@gmail.com>
+--
+-- This module lifts the bytestring IO operations into the region monad.
+--
+-------------------------------------------------------------------------------
+
+module Data.ByteString.Char8.SaferFileHandles
+    ( hGetLine
+    , hGetContents
+    , hGet
+    , hGetNonBlocking
+
+    , hPut
+    , hPutStr
+    , hPutStrLn
+    ) where
+
+-------------------------------------------------------------------------------
+-- Imports
+-------------------------------------------------------------------------------
+
+-- from base:
+import Data.Int ( Int )
+
+-- from transformers:
+import Control.Monad.IO.Class ( MonadIO )
+
+-- from bytestring:
+import qualified Data.ByteString.Char8 as B
+
+-- from regions:
+import Control.Monad.Trans.Region ( ParentOf )
+
+-- from explicit-iomodes-bytestring:
+import qualified Data.ByteString.Char8.ExplicitIOModes as E ( hGetLine
+                                                            , hGetContents
+                                                            , hGet
+                                                            , hGetNonBlocking
+
+                                                            , hPut
+                                                            , hPutStr
+                                                            , hPutStrLn
+                                                            )
+
+-- from safer-file-handles:
+import System.IO.SaferFileHandles          ( RegionalFileHandle
+                                           , ReadModes, WriteModes
+                                           )
+import System.IO.SaferFileHandles.Unsafe   ( wrap, wrap2 )
+
+
+-------------------------------------------------------------------------------
+-- ByteString I/O with regional file handles
+-------------------------------------------------------------------------------
+
+-- | Wraps: @Data.ByteString.'B.hGetLine'@.
+hGetLine ∷ (pr `ParentOf` cr, MonadIO cr, ReadModes ioMode)
+         ⇒ RegionalFileHandle ioMode pr → cr B.ByteString
+hGetLine = wrap E.hGetLine
+
+-- | Wraps: @Data.ByteString.'B.hGetContents'@.
+hGetContents ∷ (pr `ParentOf` cr, MonadIO cr, ReadModes ioMode)
+             ⇒ RegionalFileHandle ioMode pr → cr B.ByteString
+hGetContents = wrap E.hGetContents
+
+-- | Wraps: @Data.ByteString.'B.hGet'@.
+hGet ∷ (pr `ParentOf` cr, MonadIO cr, ReadModes ioMode)
+     ⇒ RegionalFileHandle ioMode pr → Int → cr B.ByteString
+hGet = wrap2 E.hGet
+
+-- | Wraps: @Data.ByteString.'B.hGetNonBlocking'@.
+hGetNonBlocking ∷ (pr `ParentOf` cr, MonadIO cr, ReadModes ioMode)
+                ⇒ RegionalFileHandle ioMode pr → Int → cr B.ByteString
+hGetNonBlocking = wrap2 E.hGetNonBlocking
+
+
+-- | Wraps: @Data.ByteString.'B.hPut'@.
+hPut ∷ (pr `ParentOf` cr, MonadIO cr, WriteModes ioMode)
+     ⇒ RegionalFileHandle ioMode pr → B.ByteString → cr ()
+hPut = wrap2 E.hPut
+
+-- | Wraps: @Data.ByteString.'B.hPutStr'@.
+hPutStr ∷ (pr `ParentOf` cr, MonadIO cr, WriteModes ioMode)
+        ⇒ RegionalFileHandle ioMode pr → B.ByteString → cr ()
+hPutStr = wrap2 E.hPutStr
+
+-- | Wraps: @Data.ByteString.'B.hPutStrLn'@.
+hPutStrLn ∷ (pr `ParentOf` cr, MonadIO cr, WriteModes ioMode)
+          ⇒ RegionalFileHandle ioMode pr → B.ByteString → cr ()
+hPutStrLn = wrap2 E.hPutStrLn
+
+
+-- The End ---------------------------------------------------------------------
diff --git a/Data/ByteString/Lazy/Char8/SaferFileHandles.hs b/Data/ByteString/Lazy/Char8/SaferFileHandles.hs
new file mode 100644
--- /dev/null
+++ b/Data/ByteString/Lazy/Char8/SaferFileHandles.hs
@@ -0,0 +1,75 @@
+{-# LANGUAGE UnicodeSyntax, NoImplicitPrelude #-}
+
+-------------------------------------------------------------------------------
+-- |
+-- Module      :  Data.ByteString.SaferFileHandles
+-- Copyright   :  (c) 2010 Bas van Dijk
+-- License     :  BSD3 (see the file LICENSE)
+-- Maintainer  :  Bas van Dijk <v.dijk.bas@gmail.com>
+--
+-- This module lifts the bytestring IO operations into the region monad.
+--
+-------------------------------------------------------------------------------
+
+module Data.ByteString.Lazy.Char8.SaferFileHandles
+    ( hGetContents
+    , hGet
+    , hGetNonBlocking
+
+    , hPut
+    ) where
+
+-------------------------------------------------------------------------------
+-- Imports
+-------------------------------------------------------------------------------
+
+-- from base:
+import Data.Int ( Int )
+
+-- from transformers:
+import Control.Monad.IO.Class ( MonadIO )
+
+-- from bytestring:
+import qualified Data.ByteString.Lazy.Char8 as B
+
+-- from regions:
+import Control.Monad.Trans.Region ( ParentOf )
+
+-- from explicit-iomodes-bytestring:
+import qualified Data.ByteString.Lazy.Char8.ExplicitIOModes as E
+    ( hGetContents, hGet, hGetNonBlocking
+    , hPut
+    )
+
+-- from safer-file-handles:
+import System.IO.SaferFileHandles ( RegionalFileHandle , ReadModes, WriteModes )
+import System.IO.SaferFileHandles.Unsafe ( wrap, wrap2 )
+
+
+-------------------------------------------------------------------------------
+-- ByteString I/O with regional file handles
+-------------------------------------------------------------------------------
+
+-- | Wraps: @Data.ByteString.'B.hGetContents'@.
+hGetContents ∷ (pr `ParentOf` cr, MonadIO cr, ReadModes ioMode)
+             ⇒ RegionalFileHandle ioMode pr → cr B.ByteString
+hGetContents = wrap E.hGetContents
+
+-- | Wraps: @Data.ByteString.'B.hGet'@.
+hGet ∷ (pr `ParentOf` cr, MonadIO cr, ReadModes ioMode)
+     ⇒ RegionalFileHandle ioMode pr → Int → cr B.ByteString
+hGet = wrap2 E.hGet
+
+-- | Wraps: @Data.ByteString.'B.hGetNonBlocking'@.
+hGetNonBlocking ∷ (pr `ParentOf` cr, MonadIO cr, ReadModes ioMode)
+                ⇒ RegionalFileHandle ioMode pr → Int → cr B.ByteString
+hGetNonBlocking = wrap2 E.hGetNonBlocking
+
+
+-- | Wraps: @Data.ByteString.'B.hPut'@.
+hPut ∷ (pr `ParentOf` cr, MonadIO cr, WriteModes ioMode)
+     ⇒ RegionalFileHandle ioMode pr → B.ByteString → cr ()
+hPut = wrap2 E.hPut
+
+
+-- The End ---------------------------------------------------------------------
diff --git a/Data/ByteString/Lazy/SaferFileHandles.hs b/Data/ByteString/Lazy/SaferFileHandles.hs
new file mode 100644
--- /dev/null
+++ b/Data/ByteString/Lazy/SaferFileHandles.hs
@@ -0,0 +1,86 @@
+{-# LANGUAGE UnicodeSyntax, NoImplicitPrelude #-}
+
+-------------------------------------------------------------------------------
+-- |
+-- Module      :  Data.ByteString.SaferFileHandles
+-- Copyright   :  (c) 2010 Bas van Dijk
+-- License     :  BSD3 (see the file LICENSE)
+-- Maintainer  :  Bas van Dijk <v.dijk.bas@gmail.com>
+--
+-- This module lifts the bytestring IO operations into the region monad.
+--
+-------------------------------------------------------------------------------
+
+module Data.ByteString.Lazy.SaferFileHandles
+    ( hGetContents
+    , hGet
+    , hGetNonBlocking
+
+    , hPut
+    , hPutStr
+    ) where
+
+-------------------------------------------------------------------------------
+-- Imports
+-------------------------------------------------------------------------------
+
+-- from base:
+import Data.Int ( Int )
+
+-- from transformers:
+import Control.Monad.IO.Class ( MonadIO )
+
+-- from bytestring:
+import qualified Data.ByteString.Lazy as B
+
+-- from regions:
+import Control.Monad.Trans.Region ( ParentOf )
+
+-- from explicit-iomodes-bytestring:
+import qualified Data.ByteString.Lazy.ExplicitIOModes as E ( hGetContents
+                                                           , hGet
+                                                           , hGetNonBlocking
+
+                                                           , hPut
+                                                           , hPutStr
+                                                           )
+
+-- from safer-file-handles:
+import System.IO.SaferFileHandles          ( RegionalFileHandle
+                                           , ReadModes, WriteModes
+                                           )
+import System.IO.SaferFileHandles.Unsafe   ( wrap, wrap2 )
+
+
+-------------------------------------------------------------------------------
+-- ByteString I/O with regional file handles
+-------------------------------------------------------------------------------
+
+-- | Wraps: @Data.ByteString.'B.hGetContents'@.
+hGetContents ∷ (pr `ParentOf` cr, MonadIO cr, ReadModes ioMode)
+             ⇒ RegionalFileHandle ioMode pr → cr B.ByteString
+hGetContents = wrap E.hGetContents
+
+-- | Wraps: @Data.ByteString.'B.hGet'@.
+hGet ∷ (pr `ParentOf` cr, MonadIO cr, ReadModes ioMode)
+     ⇒ RegionalFileHandle ioMode pr → Int → cr B.ByteString
+hGet = wrap2 E.hGet
+
+-- | Wraps: @Data.ByteString.'B.hGetNonBlocking'@.
+hGetNonBlocking ∷ (pr `ParentOf` cr, MonadIO cr, ReadModes ioMode)
+                ⇒ RegionalFileHandle ioMode pr → Int → cr B.ByteString
+hGetNonBlocking = wrap2 E.hGetNonBlocking
+
+
+-- | Wraps: @Data.ByteString.'B.hPut'@.
+hPut ∷ (pr `ParentOf` cr, MonadIO cr, WriteModes ioMode)
+     ⇒ RegionalFileHandle ioMode pr → B.ByteString → cr ()
+hPut = wrap2 E.hPut
+
+-- | Wraps: @Data.ByteString.'B.hPutStr'@.
+hPutStr ∷ (pr `ParentOf` cr, MonadIO cr, WriteModes ioMode)
+        ⇒ RegionalFileHandle ioMode pr → B.ByteString → cr ()
+hPutStr = wrap2 E.hPutStr
+
+
+-- The End ---------------------------------------------------------------------
diff --git a/Data/ByteString/SaferFileHandles.hs b/Data/ByteString/SaferFileHandles.hs
new file mode 100644
--- /dev/null
+++ b/Data/ByteString/SaferFileHandles.hs
@@ -0,0 +1,99 @@
+{-# LANGUAGE UnicodeSyntax, NoImplicitPrelude #-}
+
+-------------------------------------------------------------------------------
+-- |
+-- Module      :  Data.ByteString.SaferFileHandles
+-- Copyright   :  (c) 2010 Bas van Dijk
+-- License     :  BSD3 (see the file LICENSE)
+-- Maintainer  :  Bas van Dijk <v.dijk.bas@gmail.com>
+--
+-- This module lifts the bytestring IO operations into the region monad.
+--
+-------------------------------------------------------------------------------
+
+module Data.ByteString.SaferFileHandles
+    ( hGetLine
+    , hGetContents
+    , hGet
+    , hGetNonBlocking
+
+    , hPut
+    , hPutStr
+    , hPutStrLn
+    ) where
+
+-------------------------------------------------------------------------------
+-- Imports
+-------------------------------------------------------------------------------
+
+-- from base:
+import Data.Int ( Int )
+
+-- from transformers:
+import Control.Monad.IO.Class ( MonadIO )
+
+-- from bytestring:
+import qualified Data.ByteString as B
+
+-- from regions:
+import Control.Monad.Trans.Region ( ParentOf )
+
+-- from explicit-iomodes-bytestring:
+import qualified Data.ByteString.ExplicitIOModes as E ( hGetLine
+                                                      , hGetContents
+                                                      , hGet
+                                                      , hGetNonBlocking
+
+                                                      , hPut
+                                                      , hPutStr
+                                                      , hPutStrLn
+                                                      )
+
+-- from safer-file-handles:
+import System.IO.SaferFileHandles          ( RegionalFileHandle
+                                           , ReadModes, WriteModes
+                                           )
+import System.IO.SaferFileHandles.Unsafe   ( wrap, wrap2 )
+
+
+-------------------------------------------------------------------------------
+-- ByteString I/O with regional file handles
+-------------------------------------------------------------------------------
+
+-- | Wraps: @Data.ByteString.'B.hGetLine'@.
+hGetLine ∷ (pr `ParentOf` cr, MonadIO cr, ReadModes ioMode)
+         ⇒ RegionalFileHandle ioMode pr → cr B.ByteString
+hGetLine = wrap E.hGetLine
+
+-- | Wraps: @Data.ByteString.'B.hGetContents'@.
+hGetContents ∷ (pr `ParentOf` cr, MonadIO cr, ReadModes ioMode)
+             ⇒ RegionalFileHandle ioMode pr → cr B.ByteString
+hGetContents = wrap E.hGetContents
+
+-- | Wraps: @Data.ByteString.'B.hGet'@.
+hGet ∷ (pr `ParentOf` cr, MonadIO cr, ReadModes ioMode)
+     ⇒ RegionalFileHandle ioMode pr → Int → cr B.ByteString
+hGet = wrap2 E.hGet
+
+-- | Wraps: @Data.ByteString.'B.hGetNonBlocking'@.
+hGetNonBlocking ∷ (pr `ParentOf` cr, MonadIO cr, ReadModes ioMode)
+                ⇒ RegionalFileHandle ioMode pr → Int → cr B.ByteString
+hGetNonBlocking = wrap2 E.hGetNonBlocking
+
+-- | Wraps: @Data.ByteString.'B.hPut'@.
+hPut ∷ (pr `ParentOf` cr, MonadIO cr, WriteModes ioMode)
+     ⇒ RegionalFileHandle ioMode pr → B.ByteString → cr ()
+hPut = wrap2 E.hPut
+
+-- | Wraps: @Data.ByteString.'B.hPutStr'@.
+hPutStr ∷ (pr `ParentOf` cr, MonadIO cr, WriteModes ioMode)
+        ⇒ RegionalFileHandle ioMode pr → B.ByteString → cr ()
+hPutStr = wrap2 E.hPutStr
+
+-- | Wraps: @Data.ByteString.'B.hPutStrLn'@.
+hPutStrLn ∷ (pr `ParentOf` cr, MonadIO cr, WriteModes ioMode)
+          ⇒ RegionalFileHandle ioMode pr → B.ByteString → cr ()
+hPutStrLn = wrap2 E.hPutStrLn
+
+
+-- The End ---------------------------------------------------------------------
diff --git a/LICENSE b/LICENSE
new file mode 100644
--- /dev/null
+++ b/LICENSE
@@ -0,0 +1,31 @@
+Copyright (c) 2010 Bas van Dijk
+
+All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are
+met:
+
+    * Redistributions of source code must retain the above copyright
+      notice, this list of conditions and the following disclaimer.
+
+    * Redistributions in binary form must reproduce the above
+      copyright notice, this list of conditions and the following
+      disclaimer in the documentation and/or other materials provided
+      with the distribution.
+
+    * The name of Bas van Dijk and the names of contributors may NOT
+      be used to endorse or promote products derived from this
+      software without specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
diff --git a/Setup.hs b/Setup.hs
new file mode 100644
--- /dev/null
+++ b/Setup.hs
@@ -0,0 +1,2 @@
+import Distribution.Simple
+main = defaultMain
diff --git a/safer-file-handles-bytestring.cabal b/safer-file-handles-bytestring.cabal
new file mode 100644
--- /dev/null
+++ b/safer-file-handles-bytestring.cabal
@@ -0,0 +1,30 @@
+name:          safer-file-handles-bytestring
+version:       0.1
+cabal-version: >=1.6
+build-type:    Simple
+license:       BSD3
+license-file:  LICENSE
+copyright:     2010 Bas van Dijk
+author:        Bas van Dijk
+maintainer:    Bas van Dijk <v.dijk.bas@gmail.com>
+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
+
+Library
+  GHC-Options: -Wall
+  build-depends: base               	     >= 4   && < 4.3
+               , bytestring         	     >= 0.9 && < 0.10
+               , regions            	     >= 0.6 && < 0.7
+               , transformers       	     >= 0.2 && < 0.3
+               , explicit-iomodes-bytestring >= 0.1 && < 0.2
+               , safer-file-handles          >= 0.6 && < 0.7
+  exposed-modules: Data.ByteString.SaferFileHandles
+                   Data.ByteString.Char8.SaferFileHandles
+                   Data.ByteString.Lazy.SaferFileHandles
+                   Data.ByteString.Lazy.Char8.SaferFileHandles
