Safe Haskell | Safe |
---|---|
Language | Haskell2010 |
Protolude.ConvertText
Description
Non-partial text conversion typeclass and functions.
For an alternative with partial conversions import
Conv
.
Synopsis
-
class
ConvertText
a b
where
- toS :: a -> b
- toUtf8 :: ConvertText a Text => a -> ByteString
- toUtf8Lazy :: ConvertText a Text => a -> ByteString
Documentation
class ConvertText a b where Source #
Convert from one Unicode textual type to another. Not for serialization/deserialization, so doesn't have instances for bytestrings.
Instances
toUtf8 :: ConvertText a Text => a -> ByteString Source #
toUtf8Lazy :: ConvertText a Text => a -> ByteString Source #