Safe Haskell | Safe |
---|---|
Language | Haskell2010 |
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
ConvertText ByteString ByteString Source # | |
Defined in Protolude.ConvertText toS :: ByteString -> ByteString Source # | |
ConvertText ByteString ByteString Source # | |
Defined in Protolude.ConvertText toS :: ByteString -> ByteString Source # | |
ConvertText ByteString ByteString Source # | |
Defined in Protolude.ConvertText toS :: ByteString -> ByteString Source # | |
ConvertText ByteString ByteString Source # | |
Defined in Protolude.ConvertText toS :: ByteString -> ByteString Source # | |
ConvertText Text Text Source # | |
ConvertText Text Text Source # | |
ConvertText Text String Source # | |
ConvertText Text Text Source # | |
ConvertText Text Text Source # | |
ConvertText Text String Source # | |
ConvertText String Text Source # | |
ConvertText String Text Source # | |
ConvertText String String Source # | |
toUtf8 :: ConvertText a Text => a -> ByteString Source #
toUtf8Lazy :: ConvertText a Text => a -> ByteString Source #