on master help sign in
Stub in strict I/O support.

--HG-- extra : convert_revision : 691c8b1c53ab0328415bfdcc8665848936c01aa5

commit8d53bbd9cf1113feec6c62dc0dc97fa69bb6d924 authorBryan O'Sullivan <bos@serpentine.com> dateSun 13 Dec 2009, 19:45 (17 years ago) parentac754aa
2 files changed+57−1
Data/Text/IO.hs+55 text.cabal+2−1
Data/Text/IO.hsnew file+55
@@ -0,0 +1,55 @@
1+-- |
2+-- Module : Data.Text.IO
3+-- Copyright : (c) Bryan O'Sullivan 2009
4+-- License : BSD-style
5+-- Maintainer : bos@serpentine.com
6+-- Stability : experimental
7+-- Portability : GHC
8+--
9+-- Support for text I\/O.
10+
11+module Data.Text.IO
12+ (
13+ -- * Operations on handles
14+ hGetContents
15+ , hGetLine
16+ , hPutStr
17+ , hPutStrLn
18+ -- * Special cases for standard input and output
19+ , interact
20+ , getContents
21+ , getLine
22+ , putStr
23+ , putStrLn
24+ ) where
25+
26+import Data.Text (Text)
27+import Prelude hiding (getContents, getLine, interact, putStr, putStrLn)
28+import System.IO (Handle, stdin, stdout)
29+
30+hGetContents :: Handle -> IO Text
31+hGetContents h = undefined
32+
33+hGetLine :: Handle -> IO Text
34+hGetLine h = undefined
35+
36+hPutStr :: Handle -> Text -> IO ()
37+hPutStr h t = undefined
38+
39+hPutStrLn :: Handle -> Text -> IO ()
40+hPutStrLn h t = undefined
41+
42+interact :: (Text -> Text) -> IO ()
43+interact f = undefined
44+
45+getContents :: IO Text
46+getContents = hGetContents stdin
47+
48+getLine :: IO Text
49+getLine = hGetLine stdin
50+
51+putStr :: Text -> IO ()
52+putStr = hPutStr stdout
53+
54+putStrLn :: Text -> IO ()
55+putStrLn = hPutStrLn stdout
text.cabal+2−1
@@ -1,5 +1,5 @@
11name: text
2−version: 0.6
2+version: 0.7
33synopsis: An efficient packed Unicode text type
44description: An efficient packed Unicode text type.
55license: BSD3
@@ -38,6 +38,7 @@ library
3838 Data.Text.Encoding
3939 Data.Text.Encoding.Error
4040 Data.Text.Foreign
41+ Data.Text.IO
4142 Data.Text.Lazy
4243 Data.Text.Lazy.Encoding
4344 other-modules: