Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

Stub in strict I/O support.

--HG--
extra : convert_revision : 691c8b1
  • Loading branch information...
commit 8d53bbd9cf1113feec6c62dc0dc97fa69bb6d924 1 parent ac754aa
Bryan O'Sullivan authored

Showing 2 changed files with 57 additions and 1 deletion. Show diff stats Hide diff stats

  1. +55 0 Data/Text/IO.hs
  2. +2 1  text.cabal
55 Data/Text/IO.hs
... ... @@ -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
3  text.cabal
... ... @@ -1,5 +1,5 @@
1 1 name: text
2   -version: 0.6
  2 +version: 0.7
3 3 synopsis: An efficient packed Unicode text type
4 4 description: An efficient packed Unicode text type.
5 5 license: BSD3
@@ -38,6 +38,7 @@ library
38 38 Data.Text.Encoding
39 39 Data.Text.Encoding.Error
40 40 Data.Text.Foreign
  41 + Data.Text.IO
41 42 Data.Text.Lazy
42 43 Data.Text.Lazy.Encoding
43 44 other-modules:

0 comments on commit 8d53bbd

Please sign in to comment.
Something went wrong with that request. Please try again.