| Safe Haskell | None |
|---|---|
| Language | Haskell2010 |
Data.Encoding.Bottom
Description
Encodes and decodes Texts to Bottoms. For details, see the
Bottom spec.
Documentation
A Bottom is a wrapper around well-formed, Bottom-encoded ByteString.
Its instances are derived from those of ByteString.
unBottom :: Bottom -> ByteString Source #
unBottom unwraps the underlying ByteString.
encode :: Text -> Bottom Source #
encode takes a Text, and encodes it into a Bottom. To get at the
underlying ByteString, unwrap the returned value with unBottom.
decode' :: ByteString -> Either String Text Source #
decode' decodes an arbitrary Bottom-encoded ByteString into a Text,
or returns a parse error message if the ByteString is malformed.