-- Hoogle documentation, generated by Haddock -- See Hoogle, http://www.haskell.org/hoogle/ -- | Encode and decode Text to/from ByteString using TextEncoding -- -- Encode and decode Text to/from ByteString using TextEncoding @package text-locale-encoding @version 0.1 -- | This module provides functions to encode and decode Text -- to/from ByteString using TextEncoding -- -- For performance, Text's native decode* functions are used if the -- conditions are right (LF NewlineMode and UTF encoding). module Data.Text.Encoding.Locale -- | Decode ByteString to Text using current locale decodeLocale :: ByteString -> IO Text -- | Encode Text to ByteString using current locale encodeLocale :: Text -> IO ByteString -- | Decode ByteString to Text using supplied -- TextEncoding and NewlineMode decodeLocale' :: TextEncoding -> NewlineMode -> ByteString -> IO Text -- | Encode Text to ByteString using supplied -- TextEncoding and NewlineMode encodeLocale' :: TextEncoding -> NewlineMode -> Text -> IO ByteString -- | Decode ByteString to Text using Handles -- TextEncoding and NewlineMode decodeFromHandle :: Handle -> ByteString -> IO Text -- | Encode Text to ByteString using Handles -- TextEncoding and NewlineMode encodeFromHandle :: Handle -> Text -> IO ByteString -- | This module offers much faster locale-aware I/O than -- Data.Text.IO due to the usage of hPutBuf to write the -- resulting ByteString all at once, while Data.Text.IO -- writes characters one at a time, taking the Handle lock each -- time. Since functions in this module take the lock just once, they can -- safely be used from multiple threads without fear of messed up output. -- -- Functions in this module require at least twice as much memory as the -- Text they operate on to output it. For strings more than a half -- of available RAM in size, this may result in memory exhaustion. -- -- This module is intended to be imported qualified. module Data.Text.IO.Locale -- | Like putStr, but writes the Text all at once. putStr :: Text -> IO () -- | Like putStrLn, but writes the Text all at once. putStrLn :: Text -> IO () -- | Like hPutStr, but writes the Text all at once. hPutStr :: Handle -> Text -> IO () -- | Like hPutStrLn, but writes the Text all at once. hPutStrLn :: Handle -> Text -> IO () -- | Like writeFile, but writes the Text all at once. writeFile :: FilePath -> Text -> IO () -- | Like appendFile, but writes the Text all at once. appendFile :: FilePath -> Text -> IO () -- | This module provides functions to encode and decode Text -- to/from ByteString using TextEncoding -- -- For performance, Text's native decode* functions are used if the -- conditions are right (LF NewlineMode and UTF encoding). module Data.Text.Lazy.Encoding.Locale -- | Decode ByteString to Text using current locale decodeLocale :: ByteString -> IO Text -- | Encode Text to ByteString using current locale encodeLocale :: Text -> IO ByteString -- | Decode ByteString to Text using supplied -- TextEncoding and NewlineMode decodeLocale' :: TextEncoding -> NewlineMode -> ByteString -> IO Text -- | Encode Text to ByteString using supplied -- TextEncoding and NewlineMode encodeLocale' :: TextEncoding -> NewlineMode -> Text -> IO ByteString -- | Decode ByteString to Text using Handles -- TextEncoding and NewlineMode decodeFromHandle :: Handle -> ByteString -> IO Text -- | Encode Text to ByteString using Handles -- TextEncoding and NewlineMode encodeFromHandle :: Handle -> Text -> IO ByteString