-- Hoogle documentation, generated by Haddock
-- See Hoogle, http://www.haskell.org/hoogle/


-- | Convert textual types through Text without needing O(n^2) instances.
--   
--   Convert textual types through Text without needing O(n^2) instances.
--   
--   See the README for more information:
--   <a>https://github.com/bergmark/through-text/blob/master/README.md</a>
@package through-text
@version 0.1.0.0

module Data.Text.Through
class ToText a
toText :: ToText a => a -> StrictText
class FromText a
fromText :: FromText a => StrictText -> a

-- | Convert between all textual types.
throughText :: (ToText a, FromText b) => a -> b
type LazyByteString = ByteString
type LazyText = Text
type StrictByteString = ByteString
type StrictText = Text

-- | A <tt>CI s</tt> provides <i>C</i>ase <i>I</i>nsensitive comparison for
--   the string-like type <tt>s</tt> (for example: <tt>String</tt>,
--   <a>Text</a>, <a>ByteString</a>, etc.).
--   
--   Note that <tt>CI s</tt> has an instance for <a>IsString</a> which
--   together with the <tt>OverloadedStrings</tt> language extension allows
--   you to write case insensitive string literals as in:
--   
--   <pre>
--   &gt; ("Content-Type" :: <a>CI</a> <a>Text</a>) == ("CONTENT-TYPE" :: <a>CI</a> <a>Text</a>)
--   True
--   </pre>
data CI s

-- | More efficient than throughText, replaces invalid characters with
--   U+FFFD.
lazyByteStringToLazyText :: LazyByteString -> LazyText

-- | More efficient than throughText
lazyTextToLazyByteString :: LazyText -> LazyByteString
instance Data.Text.Through.FromText Data.Text.Through.StrictText
instance Data.Text.Through.FromText [GHC.Types.Char]
instance Data.Text.Through.FromText Data.Text.Through.LazyText
instance Data.Text.Through.FromText Data.Text.Through.StrictByteString
instance Data.Text.Through.FromText Data.Text.Through.LazyByteString
instance (Data.CaseInsensitive.Internal.FoldCase a, Data.Text.Through.FromText a) => Data.Text.Through.FromText (Data.CaseInsensitive.Internal.CI a)
instance Data.Text.Through.ToText Data.Text.Through.StrictText
instance Data.Text.Through.ToText [GHC.Types.Char]
instance Data.Text.Through.ToText Data.Text.Through.LazyText
instance Data.Text.Through.ToText Data.Text.Through.StrictByteString
instance Data.Text.Through.ToText Data.Text.Through.LazyByteString
instance Data.Text.Through.ToText a => Data.Text.Through.ToText (Data.CaseInsensitive.Internal.CI a)
