protolude-0.3.4: A small prelude.

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 #

Convert from one Unicode textual type to another. Not for serialization/deserialization, so doesn't have instances for bytestrings.

Methods

toS :: a -> b #

#### Instances

Instances details

ConvertText ByteString ByteString # |
Instance details Defined in Protolude.ConvertText Methods toS :: ByteString -> ByteString #
ConvertText ByteString ByteString # |
Instance details Defined in Protolude.ConvertText Methods toS :: ByteString -> ByteString #
ConvertText ByteString ByteString # |
Instance details Defined in Protolude.ConvertText Methods toS :: ByteString -> ByteString #
ConvertText ByteString ByteString # |
Instance details Defined in Protolude.ConvertText Methods toS :: ByteString -> ByteString #
ConvertText Text Text # |
Instance details Defined in Protolude.ConvertText Methods toS :: Text -> Text #
ConvertText Text Text # |
Instance details Defined in Protolude.ConvertText Methods toS :: Text -> Text #
ConvertText Text String # |
Instance details Defined in Protolude.ConvertText Methods toS :: Text -> String #
ConvertText Text Text # |
Instance details Defined in Protolude.ConvertText Methods toS :: Text -> Text #
ConvertText Text Text # |
Instance details Defined in Protolude.ConvertText Methods toS :: Text -> Text #
ConvertText Text String # |
Instance details Defined in Protolude.ConvertText Methods toS :: Text -> String #
ConvertText String Text # |
Instance details Defined in Protolude.ConvertText Methods toS :: String -> Text #
ConvertText String Text # |
Instance details Defined in Protolude.ConvertText Methods toS :: String -> Text #
ConvertText String String # |
Instance details Defined in Protolude.ConvertText Methods toS :: String -> String #

toUtf8 :: ConvertText a Text => a -> ByteString #

toUtf8Lazy :: ConvertText a Text => a -> ByteString #