diff --git a/Data/Text/IO/ExplicitIOModes.hs b/Data/Text/IO/ExplicitIOModes.hs
new file mode 100644
--- /dev/null
+++ b/Data/Text/IO/ExplicitIOModes.hs
@@ -0,0 +1,70 @@
+{-# LANGUAGE UnicodeSyntax, NoImplicitPrelude #-}
+
+-------------------------------------------------------------------------------
+-- |
+-- Module      :  Data.Text.IO.ExplicitIOModes
+-- 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 'Text' IO operations to handles with explicit
+-- IOModes.
+--
+-------------------------------------------------------------------------------
+
+module Data.Text.IO.ExplicitIOModes
+    ( hGetLine
+    , hGetContents
+
+    , hPutStr
+    , hPutStrLn
+    ) where
+
+
+-------------------------------------------------------------------------------
+-- Imports
+-------------------------------------------------------------------------------
+
+-- from base:
+import System.IO ( IO )
+
+-- from text:
+import Data.Text ( Text )
+
+import qualified Data.Text.IO as T ( hGetLine
+                                   , hGetContents
+
+                                   , hPutStr
+                                   , hPutStrLn
+                                   )
+
+-- from explicit-iomodes:
+import System.IO.ExplicitIOModes ( Handle
+                                 , ReadModes, WriteModes
+                                 )
+import System.IO.ExplicitIOModes.Unsafe ( wrap, wrap2 )
+
+
+-------------------------------------------------------------------------------
+-- Text I/O with file handles with explicit IOModes
+-------------------------------------------------------------------------------
+
+-- | Wraps @Data.Text.IO.'T.hGetLine'@.
+hGetLine ∷ ReadModes ioMode ⇒ Handle ioMode → IO Text
+hGetLine = wrap T.hGetLine
+
+-- | Wraps @Data.Text.IO.'T.hGetContents'@.
+hGetContents ∷ ReadModes ioMode ⇒ Handle ioMode → IO Text
+hGetContents = wrap T.hGetContents
+
+
+-- | Wraps @Data.Text.IO.'T.hPutStr'@.
+hPutStr ∷ WriteModes ioMode ⇒ Handle ioMode → Text → IO ()
+hPutStr = wrap2 T.hPutStr
+
+-- | Wraps @Data.Text.IO.'T.hPutStrLn'@.
+hPutStrLn ∷ WriteModes ioMode ⇒ Handle ioMode → Text → IO ()
+hPutStrLn = wrap2 T.hPutStrLn
+
+
+-- The End ---------------------------------------------------------------------
diff --git a/Data/Text/Lazy/IO/ExplicitIOModes.hs b/Data/Text/Lazy/IO/ExplicitIOModes.hs
new file mode 100644
--- /dev/null
+++ b/Data/Text/Lazy/IO/ExplicitIOModes.hs
@@ -0,0 +1,70 @@
+{-# LANGUAGE UnicodeSyntax, NoImplicitPrelude #-}
+
+-------------------------------------------------------------------------------
+-- |
+-- Module      :  Data.Text.Lazy.IO.ExplicitIOModes
+-- 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 lazy 'Text' IO operations to handles with explicit
+-- IOModes.
+--
+-------------------------------------------------------------------------------
+
+module Data.Text.Lazy.IO.ExplicitIOModes
+    ( hGetLine
+    , hGetContents
+
+    , hPutStr
+    , hPutStrLn
+    ) where
+
+
+-------------------------------------------------------------------------------
+-- Imports
+-------------------------------------------------------------------------------
+
+-- from base:
+import System.IO ( IO )
+
+-- from text:
+import Data.Text.Lazy ( Text )
+
+import qualified Data.Text.Lazy.IO as T ( hGetLine
+                                        , hGetContents
+
+                                        , hPutStr
+                                        , hPutStrLn
+                                        )
+
+-- from explicit-iomodes:
+import System.IO.ExplicitIOModes ( Handle
+                                 , ReadModes, WriteModes
+                                 )
+import System.IO.ExplicitIOModes.Unsafe ( wrap, wrap2 )
+
+
+-------------------------------------------------------------------------------
+-- Lazy Text I/O with file handles with explicit IOModes
+-------------------------------------------------------------------------------
+
+-- | Wraps @Data.Text.Lazy.IO.'T.hGetLine'@.
+hGetLine ∷ ReadModes ioMode ⇒ Handle ioMode → IO Text
+hGetLine = wrap T.hGetLine
+
+-- | Wraps @Data.Text.Lazy.IO.'T.hGetContents'@.
+hGetContents ∷ ReadModes ioMode ⇒ Handle ioMode → IO Text
+hGetContents = wrap T.hGetContents
+
+
+-- | Wraps @Data.Text.Lazy.IO.'T.hPutStr'@.
+hPutStr ∷ WriteModes ioMode ⇒ Handle ioMode → Text → IO ()
+hPutStr = wrap2 T.hPutStr
+
+-- | Wraps @Data.Text.Lazy.IO.'T.hPutStrLn'@.
+hPutStrLn ∷ WriteModes ioMode ⇒ Handle ioMode → Text → IO ()
+hPutStrLn = wrap2 T.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,4 @@
+#! /usr/bin/env runhaskell
+
+import Distribution.Simple
+main = defaultMain
diff --git a/explicit-iomodes-text.cabal b/explicit-iomodes-text.cabal
new file mode 100644
--- /dev/null
+++ b/explicit-iomodes-text.cabal
@@ -0,0 +1,25 @@
+name:          explicit-iomodes-text
+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
+synopsis:      Extends explicit-iomodes with Text operations
+description:   Extends @explicit-iomodes@ with @Text@ operations
+
+source-repository head
+  Type:     darcs
+  Location: http://code.haskell.org/~basvandijk/code/explicit-iomodes-text
+
+Library
+  GHC-Options: -Wall
+  build-depends: base             >= 4   && < 4.3
+               , text             >= 0.7 && < 0.8
+               , explicit-iomodes >= 0.4 && < 0.5
+  exposed-modules: Data.Text.IO.ExplicitIOModes
+                   Data.Text.Lazy.IO.ExplicitIOModes
