to-1.0.0: Simple, safe, boring type conversions

Safe HaskellSafe
LanguageHaskell2010

To

Contents

Synopsis

Strings and bytestrings

String

class ToString a where Source #

Methods

toString :: a -> String Source #

Transforming to String.

Instances
(TypeError (SpecifyDecoding ByteString "utf8ToString") :: Constraint) => ToString ByteString Source #

Use utf8ToString.

Instance details

Defined in To

(TypeError (SpecifyDecoding ByteString "utf8ToString") :: Constraint) => ToString ByteString Source #

Use utf8ToString.

Instance details

Defined in To

ToString Builder Source # 
Instance details

Defined in To

ToString Text Source # 
Instance details

Defined in To

Methods

toString :: Text -> String Source #

ToString Text Source # 
Instance details

Defined in To

Methods

toString :: Text -> String Source #

class Utf8ToString a where Source #

Methods

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 # 
Instance details

Defined in To

Utf8ToString ByteString Source # 
Instance details

Defined in To

Strict Text

class ToText a where Source #

Methods

toText :: a -> Text Source #

Transforming to strict Text.

Instances
(TypeError (SpecifyDecoding ByteString "utf8ToText") :: Constraint) => ToText ByteString Source #

Use utf8ToText.

Instance details

Defined in To

(TypeError (SpecifyDecoding ByteString "utf8ToText") :: Constraint) => ToText ByteString Source #

Use utf8ToText.

Instance details

Defined in To

ToText Builder Source # 
Instance details

Defined in To

Methods

toText :: Builder -> Text Source #

ToText Text Source # 
Instance details

Defined in To

Methods

toText :: Text -> Text0 Source #

a ~ Char => ToText [a] Source #

String

Instance details

Defined in To

Methods

toText :: [a] -> Text Source #

class Utf8ToText a where Source #

Methods

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 # 
Instance details

Defined in To

Utf8ToText ByteString Source # 
Instance details

Defined in To

Lazy Text

class ToLazyText a where Source #

Methods

toLazyText :: a -> Text Source #

Transforming to lazy Text.

Instances
(TypeError (SpecifyDecoding ByteString "utf8ToLazyText") :: Constraint) => ToLazyText ByteString Source #

Use utf8ToLazyText.

Instance details

Defined in To

(TypeError (SpecifyDecoding ByteString "utf8ToLazyText") :: Constraint) => ToLazyText ByteString Source #

Use utf8ToLazyText.

Instance details

Defined in To

ToLazyText Builder Source # 
Instance details

Defined in To

ToLazyText Text Source # 
Instance details

Defined in To

a ~ Char => ToLazyText [a] Source #

String

Instance details

Defined in To

Methods

toLazyText :: [a] -> Text Source #

class Utf8ToLazyText a where Source #

Methods

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 # 
Instance details

Defined in To

Utf8ToLazyText ByteString Source # 
Instance details

Defined in To

Text Builder

class ToTextBuilder a where Source #

Methods

toTextBuilder :: a -> Builder Source #

Transforming to text Builder.

Instances
(TypeError (SpecifyDecoding ByteString "utf8ToTextBuilder") :: Constraint) => ToTextBuilder ByteString Source #

Use utf8ToTextBuilder.

Instance details

Defined in To

(TypeError (SpecifyDecoding ByteString "utf8ToTextBuilder") :: Constraint) => ToTextBuilder ByteString Source #

Use utf8ToTextBuilder.

Instance details

Defined in To

ToTextBuilder Text Source # 
Instance details

Defined in To

ToTextBuilder Text Source # 
Instance details

Defined in To

a ~ Char => ToTextBuilder [a] Source #

String

Instance details

Defined in To

Methods

toTextBuilder :: [a] -> Builder Source #

class Utf8ToTextBuilder a where Source #

Methods

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 # 
Instance details

Defined in To

Utf8ToTextBuilder ByteString Source # 
Instance details

Defined in To

Strict ByteString

class ToByteString a where Source #

Methods

toByteString :: a -> ByteString Source #

Transforming to strict ByteString.

Instances
ToByteString ByteString Source #

Use toUtf8ByteString.

Instance details

Defined in To

(TypeError (SpecifyEncoding Builder "toUtf8ByteString") :: Constraint) => ToByteString Builder Source #

Use toUtf8ByteString.

Instance details

Defined in To

(TypeError (SpecifyEncoding Text "toUtf8ByteString") :: Constraint) => ToByteString Text Source #

Use toUtf8ByteString.

Instance details

Defined in To

(TypeError (SpecifyEncoding Text "toUtf8ByteString") :: Constraint) => ToByteString Text Source #

Use toUtf8ByteString.

Instance details

Defined in To

(a ~ Char, (TypeError (SpecifyEncoding String "toUtf8ByteString") :: Constraint)) => ToByteString [a] Source #

Use toUtf8ByteString.

Instance details

Defined in To

Methods

toByteString :: [a] -> ByteString Source #

class ToUtf8ByteString a where Source #

Methods

toUtf8ByteString :: a -> ByteString Source #

UTF8-encode text to a ByteString.

Instances
ToUtf8ByteString Builder Source # 
Instance details

Defined in To

ToUtf8ByteString Text Source # 
Instance details

Defined in To

ToUtf8ByteString Text Source # 
Instance details

Defined in To

a ~ Char => ToUtf8ByteString [a] Source #

String

Instance details

Defined in To

Lazy ByteString

class ToLazyByteString a where Source #

Methods

toLazyByteString :: a -> ByteString Source #

Transforming to lazy ByteString.

Instances
ToLazyByteString ByteString Source # 
Instance details

Defined in To

(TypeError (SpecifyEncoding Builder "toUtf8LazyByteString") :: Constraint) => ToLazyByteString Builder Source #

Use toUtf8LazyByteString.

Instance details

Defined in To

(TypeError (SpecifyEncoding Text "toUtf8LazyByteString") :: Constraint) => ToLazyByteString Text Source #

Use toUtf8LazyByteString.

Instance details

Defined in To

(TypeError (SpecifyEncoding Text "toUtf8LazyByteString") :: Constraint) => ToLazyByteString Text Source #

Use toUtf8LazyByteString.

Instance details

Defined in To

(a ~ Char, (TypeError (SpecifyEncoding String "toUtf8LazyByteString") :: Constraint)) => ToLazyByteString [a] Source #

Use toUtf8LazyByteString.

Instance details

Defined in To

class ToUtf8LazyByteString a where Source #

Methods

toUtf8LazyByteString :: a -> ByteString Source #

UTF8-encode text to a lazy ByteString.

Instances
ToUtf8LazyByteString Builder Source # 
Instance details

Defined in To

ToUtf8LazyByteString Text Source # 
Instance details

Defined in To

ToUtf8LazyByteString Text Source # 
Instance details

Defined in To

a ~ Char => ToUtf8LazyByteString [a] Source #

String

Instance details

Defined in To