-- Hoogle documentation, generated by Haddock
-- See Hoogle, http://www.haskell.org/hoogle/
-- | Provide universal string conversions between any two string-like types
--
-- Provide universal string conversions between any two string-like types
@package string-convert
@version 2.0.0
-- | Provides universal conversions between any two string-like types.
-- Out-of-the-box, Text (both lazy and strict),
-- ByteString (both lazy and strict), and String, are supported.
--
-- To hook custom string types into the conversion mechanism, implement
-- both FromString and ToString for your type, and
-- optionally provide special cases for conversions to and from some
-- other string-like type by implementing StringConvert
-- directly.
module Text.StringConvert
class FromString a
fromString :: FromString a => String -> a
-- | Defines how a given type should be converted to String. If at all
-- possible, the conversion should be loss-less, and if encodings are
-- involved, UTF-8 should be the default.
class ToString a
toString :: ToString a => a -> String
-- | Defines conversions between two given stringish types.
class StringConvert a b
s :: StringConvert a b => a -> b
instance [overlap ok] StringConvert ByteString ByteString
instance [overlap ok] StringConvert ByteString ByteString
instance [overlap ok] StringConvert Text Text
instance [overlap ok] StringConvert Text Text
instance [overlap ok] (ToString a, FromString b) => StringConvert a b
instance [overlap ok] ToString ByteString
instance [overlap ok] ToString ByteString
instance [overlap ok] ToString Text
instance [overlap ok] ToString Text
instance [overlap ok] ToString [Char]
instance [overlap ok] FromString ByteString
instance [overlap ok] FromString ByteString
instance [overlap ok] FromString Text
instance [overlap ok] FromString Text
instance [overlap ok] FromString [Char]