HORIZON HASKELLDocslts/ghc-9.10.x248f8f02026-10-05Search names, modules, packages, or :: a typeCtrl K

GHC 9.10.3 · lts/ghc-9.10.x · 248f8f0 · 2026-10-05

Moduletext-2.1.3Haskell2010

Data.Text.IO.Utf8

Efficient UTF-8 support for text I/O. Unlike Data.Text.IO, these functions do not depend on the locale and do not do line ending conversion.

  • 12 values
  • Packagetext-2.1.3
  • Exports12
  • LanguageHaskell2010
  • LicenceBSD-2-Clause
  • SourceUtf8.hs

File-at-a-time operations

3 declarations
valuewriteFile :: FilePath -> Text -> IO ()
#

Write a string to a file. The file is truncated to zero length before writing begins.

Operations on handles

4 declarations

Special cases for standard input and output

5 declarations
valueinteract :: (Text -> Text) -> IO ()
#

The interact function takes a function of type Text -> Text as its argument. The entire input from the standard input device is passed to this function as its argument, and the resulting string is output on the standard output device.

valuegetLine :: IO Text
#

Read a single line of user input from stdin.

valueputStrLn :: Text -> IO ()
#

Write a string to stdout, followed by a newline.