Safe Haskell | None |
---|---|
Language | Haskell2010 |
Synopsis
- newtype Utf8 = Utf8 {}
- class FromUtf8 a where
- cvtLn :: FromUtf8 a => Utf8 -> a
- class Renderable a where
- render :: a -> Utf8
- renderText :: a -> Text
- renderShowable :: Show a => a -> Utf8
- unsafeInjectByteStringIntoUtf8 :: ByteString -> Utf8
- utf8ToText :: Utf8 -> Text
- utf8ToLazyText :: Utf8 -> Text
- writeFileUtf8 :: MonadIO m => FilePath -> Utf8 -> m ()
Overview
This module provides a standalone package for a wrapped ByteString
Builder
for working with UTF-8 encode byte strings. It is adaped from
the Utf8Builder
type and Display
clas from the rio
package,
and the FromBuilder
class of the fmt
package, while endeavouring to
integrate the fmt
types and clases to allow easy interoperation
between both systems.
Utf8
a UTF-8 encoded ByteString
Builder
FromUtf8
class FromUtf8 a where Source #
for converting Utf8 into other text types
Renderable
class Renderable a where Source #
for rendering things into Utf8
Nothing
Instances
Toolkit Functions
unsafeInjectByteStringIntoUtf8 :: ByteString -> Utf8 Source #
Convert a ByteString
into a Utf8
; NB, if
the ByteString
contains text using a non-UTF-8 encoding
then 'bad things' (TM) are liable to happen