Permalink
Browse files

Stub in strict I/O support.

--HG--
extra : convert_revision : 691c8b1c53ab0328415bfdcc8665848936c01aa5
  • Loading branch information...
1 parent ac754aa commit 8d53bbd9cf1113feec6c62dc0dc97fa69bb6d924 @bos committed Dec 13, 2009
Showing with 57 additions and 1 deletion.
  1. +55 −0 Data/Text/IO.hs
  2. +2 −1 text.cabal
View
@@ -0,0 +1,55 @@
+-- |
+-- Module : Data.Text.IO
+-- Copyright : (c) Bryan O'Sullivan 2009
+-- License : BSD-style
+-- Maintainer : bos@serpentine.com
+-- Stability : experimental
+-- Portability : GHC
+--
+-- Support for text I\/O.
+
+module Data.Text.IO
+ (
+ -- * Operations on handles
+ hGetContents
+ , hGetLine
+ , hPutStr
+ , hPutStrLn
+ -- * Special cases for standard input and output
+ , interact
+ , getContents
+ , getLine
+ , putStr
+ , putStrLn
+ ) where
+
+import Data.Text (Text)
+import Prelude hiding (getContents, getLine, interact, putStr, putStrLn)
+import System.IO (Handle, stdin, stdout)
+
+hGetContents :: Handle -> IO Text
+hGetContents h = undefined
+
+hGetLine :: Handle -> IO Text
+hGetLine h = undefined
+
+hPutStr :: Handle -> Text -> IO ()
+hPutStr h t = undefined
+
+hPutStrLn :: Handle -> Text -> IO ()
+hPutStrLn h t = undefined
+
+interact :: (Text -> Text) -> IO ()
+interact f = undefined
+
+getContents :: IO Text
+getContents = hGetContents stdin
+
+getLine :: IO Text
+getLine = hGetLine stdin
+
+putStr :: Text -> IO ()
+putStr = hPutStr stdout
+
+putStrLn :: Text -> IO ()
+putStrLn = hPutStrLn stdout
View
@@ -1,5 +1,5 @@
name: text
-version: 0.6
+version: 0.7
synopsis: An efficient packed Unicode text type
description: An efficient packed Unicode text type.
license: BSD3
@@ -38,6 +38,7 @@ library
Data.Text.Encoding
Data.Text.Encoding.Error
Data.Text.Foreign
+ Data.Text.IO
Data.Text.Lazy
Data.Text.Lazy.Encoding
other-modules:

0 comments on commit 8d53bbd

Please sign in to comment.