module Data.Text.All
(
module Data.Text,
module Data.Text.IO,
module Data.Text.Encoding,
LText,
Builder,
show, lshow, bshow,
show', lshow', bshow',
strictToLazy, lazyToStrict,
module Data.Text.Format,
module Data.Text.Buildable,
format, lformat, bformat,
bsingleton,
flush,
builderToStrict, builderToLazy,
strictToBuilder, lazyToBuilder,
)
where
import Data.Text
import Data.Text.IO
import Data.Text.Encoding
import qualified Data.Text.Lazy.Builder as B
import Data.Text.Lazy.Builder (Builder)
import qualified Data.Text.Lazy as TL
import TextShow hiding (Builder)
import Data.Text.Format hiding (format, print, hprint, build)
import Data.Text.Format.Params
import Data.Text.Buildable
import qualified Data.Text.Format as Format
import qualified Prelude as P
import Prelude hiding (show)
type LText = TL.Text
show :: TextShow a => a -> Text
show = showt
lshow :: TextShow a => a -> LText
lshow = showtl
bshow :: TextShow a => a -> Builder
bshow = showb
show' :: Show a => a -> Text
show' = pack . P.show
lshow' :: Show a => a -> LText
lshow' = TL.pack . P.show
bshow' :: Show a => a -> Builder
bshow' = B.fromString . P.show
format :: Params ps => Format -> ps -> Text
format f = TL.toStrict . Format.format f
lformat :: Params ps => Format -> ps -> LText
lformat = Format.format
bformat :: Params ps => Format -> ps -> Builder
bformat = Format.build
strictToLazy :: Text -> LText
strictToLazy = TL.fromStrict
lazyToStrict :: LText -> Text
lazyToStrict = TL.toStrict
builderToStrict :: Builder -> Text
builderToStrict = TL.toStrict . B.toLazyText
builderToLazy :: Builder -> LText
builderToLazy = B.toLazyText
strictToBuilder :: Text -> Builder
strictToBuilder = B.fromText
lazyToBuilder :: LText -> Builder
lazyToBuilder = B.fromLazyText
bsingleton :: Char -> Builder
bsingleton = B.singleton