Safe Haskell | Safe |
---|---|
Language | Haskell2010 |
Synopsis
- class ToString a where
- class Utf8ToString a where
- utf8ToString :: a -> String
- class ToText a where
- class Utf8ToText a where
- utf8ToText :: a -> Text
- class ToLazyText a where
- toLazyText :: a -> Text
- class Utf8ToLazyText a where
- utf8ToLazyText :: a -> Text
- class ToTextBuilder a where
- toTextBuilder :: a -> Builder
- class Utf8ToTextBuilder a where
- utf8ToTextBuilder :: a -> Builder
- class ToByteString a where
- toByteString :: a -> ByteString
- class ToUtf8ByteString a where
- toUtf8ByteString :: a -> ByteString
- class ToLazyByteString a where
- toLazyByteString :: a -> ByteString
- class ToUtf8LazyByteString a where
- toUtf8LazyByteString :: a -> ByteString
Strings and bytestrings
String
class ToString a where Source #
Instances
(TypeError (SpecifyDecoding ByteString "utf8ToString") :: Constraint) => ToString ByteString Source # | Use |
(TypeError (SpecifyDecoding ByteString "utf8ToString") :: Constraint) => ToString ByteString Source # | Use |
ToString Builder Source # | |
ToString Text Source # | |
ToString Text Source # | |
class Utf8ToString a where Source #
utf8ToString :: a -> String Source #
Decode UTF8-encoded text to a String
.
Malformed characters are replaced by U+FFFD
(the Unicode
replacement character).
Instances
Utf8ToString ByteString Source # | |
Defined in To utf8ToString :: ByteString -> String Source # | |
Utf8ToString ByteString Source # | |
Defined in To utf8ToString :: ByteString -> String Source # |
Strict Text
Instances
(TypeError (SpecifyDecoding ByteString "utf8ToText") :: Constraint) => ToText ByteString Source # | Use |
(TypeError (SpecifyDecoding ByteString "utf8ToText") :: Constraint) => ToText ByteString Source # | Use |
ToText Builder Source # | |
ToText Text Source # | |
a ~ Char => ToText [a] Source # | |
class Utf8ToText a where Source #
utf8ToText :: a -> Text Source #
Decode UTF8-encoded text to a strict Text
.
Malformed characters are replaced by U+FFFD
(the Unicode
replacement character).
Instances
Utf8ToText ByteString Source # | |
Defined in To utf8ToText :: ByteString -> Text Source # | |
Utf8ToText ByteString Source # | |
Defined in To utf8ToText :: ByteString -> Text Source # |
Lazy Text
class ToLazyText a where Source #
toLazyText :: a -> Text Source #
Transforming to lazy Text
.
Instances
(TypeError (SpecifyDecoding ByteString "utf8ToLazyText") :: Constraint) => ToLazyText ByteString Source # | Use |
Defined in To toLazyText :: ByteString -> Text Source # | |
(TypeError (SpecifyDecoding ByteString "utf8ToLazyText") :: Constraint) => ToLazyText ByteString Source # | Use |
Defined in To toLazyText :: ByteString -> Text Source # | |
ToLazyText Builder Source # | |
ToLazyText Text Source # | |
a ~ Char => ToLazyText [a] Source # | |
Defined in To toLazyText :: [a] -> Text Source # |
class Utf8ToLazyText a where Source #
utf8ToLazyText :: a -> Text Source #
Decode UTF8-encoded text to a lazy Text
.
Malformed characters are replaced by U+FFFD
(the Unicode
replacement character).
Instances
Utf8ToLazyText ByteString Source # | |
Defined in To utf8ToLazyText :: ByteString -> Text Source # | |
Utf8ToLazyText ByteString Source # | |
Defined in To utf8ToLazyText :: ByteString -> Text Source # |
Text Builder
class ToTextBuilder a where Source #
toTextBuilder :: a -> Builder Source #
Transforming to text Builder
.
Instances
(TypeError (SpecifyDecoding ByteString "utf8ToTextBuilder") :: Constraint) => ToTextBuilder ByteString Source # | Use |
Defined in To toTextBuilder :: ByteString -> Builder Source # | |
(TypeError (SpecifyDecoding ByteString "utf8ToTextBuilder") :: Constraint) => ToTextBuilder ByteString Source # | Use |
Defined in To toTextBuilder :: ByteString -> Builder Source # | |
ToTextBuilder Text Source # | |
ToTextBuilder Text Source # | |
a ~ Char => ToTextBuilder [a] Source # | |
Defined in To toTextBuilder :: [a] -> Builder Source # |
class Utf8ToTextBuilder a where Source #
utf8ToTextBuilder :: a -> Builder Source #
Decode UTF8-encoded text to a text Builder
.
Malformed characters are replaced by U+FFFD
(the Unicode
replacement character).
Instances
Utf8ToTextBuilder ByteString Source # | |
Defined in To | |
Utf8ToTextBuilder ByteString Source # | |
Defined in To |
Strict ByteString
class ToByteString a where Source #
toByteString :: a -> ByteString Source #
Transforming to strict ByteString
.
Instances
ToByteString ByteString Source # | Use |
Defined in To toByteString :: ByteString -> ByteString0 Source # | |
(TypeError (SpecifyEncoding Builder "toUtf8ByteString") :: Constraint) => ToByteString Builder Source # | Use |
Defined in To toByteString :: Builder -> ByteString Source # | |
(TypeError (SpecifyEncoding Text "toUtf8ByteString") :: Constraint) => ToByteString Text Source # | Use |
Defined in To toByteString :: Text -> ByteString Source # | |
(TypeError (SpecifyEncoding Text "toUtf8ByteString") :: Constraint) => ToByteString Text Source # | Use |
Defined in To toByteString :: Text -> ByteString Source # | |
(a ~ Char, (TypeError (SpecifyEncoding String "toUtf8ByteString") :: Constraint)) => ToByteString [a] Source # | Use |
Defined in To toByteString :: [a] -> ByteString Source # |
class ToUtf8ByteString a where Source #
toUtf8ByteString :: a -> ByteString Source #
UTF8-encode text to a ByteString
.
Instances
ToUtf8ByteString Builder Source # | |
Defined in To toUtf8ByteString :: Builder -> ByteString Source # | |
ToUtf8ByteString Text Source # | |
Defined in To toUtf8ByteString :: Text -> ByteString Source # | |
ToUtf8ByteString Text Source # | |
Defined in To toUtf8ByteString :: Text -> ByteString Source # | |
a ~ Char => ToUtf8ByteString [a] Source # | |
Defined in To toUtf8ByteString :: [a] -> ByteString Source # |
Lazy ByteString
class ToLazyByteString a where Source #
toLazyByteString :: a -> ByteString Source #
Transforming to lazy ByteString
.
Instances
ToLazyByteString ByteString Source # | |
Defined in To | |
(TypeError (SpecifyEncoding Builder "toUtf8LazyByteString") :: Constraint) => ToLazyByteString Builder Source # | Use |
Defined in To toLazyByteString :: Builder -> ByteString Source # | |
(TypeError (SpecifyEncoding Text "toUtf8LazyByteString") :: Constraint) => ToLazyByteString Text Source # | Use |
Defined in To toLazyByteString :: Text -> ByteString Source # | |
(TypeError (SpecifyEncoding Text "toUtf8LazyByteString") :: Constraint) => ToLazyByteString Text Source # | Use |
Defined in To toLazyByteString :: Text -> ByteString Source # | |
(a ~ Char, (TypeError (SpecifyEncoding String "toUtf8LazyByteString") :: Constraint)) => ToLazyByteString [a] Source # | Use |
Defined in To toLazyByteString :: [a] -> ByteString Source # |
class ToUtf8LazyByteString a where Source #
toUtf8LazyByteString :: a -> ByteString Source #
UTF8-encode text to a lazy ByteString
.
Instances
ToUtf8LazyByteString Builder Source # | |
Defined in To | |
ToUtf8LazyByteString Text Source # | |
Defined in To | |
ToUtf8LazyByteString Text Source # | |
Defined in To | |
a ~ Char => ToUtf8LazyByteString [a] Source # | |
Defined in To toUtf8LazyByteString :: [a] -> ByteString Source # |