-- Hoogle documentation, generated by Haddock -- See Hoogle, http://www.haskell.org/hoogle/ -- | SDP wrapper for Text. -- -- This package implements SDP classes for Text. @package sdp4text @version 0.2 -- | SDP.Text provides sdp instances for strict -- Text. module SDP.Text -- | Text alias, may reduce ambiguity. type SText = Text -- | A space efficient, packed, unboxed Unicode text type. data Text -- | O(n) Convert a string to folded case. Subject to fusion. -- -- This function is mainly useful for performing caseless (also known as -- case insensitive) string comparisons. -- -- A string x is a caseless match for a string y if and -- only if: -- --
--   toCaseFold x == toCaseFold y
--   
-- -- The result string may be longer than the input string, and may differ -- from applying toLower to the input string. For instance, the -- Armenian small ligature "ﬓ" (men now, U+FB13) is case folded to the -- sequence "մ" (men, U+0574) followed by "ն" (now, U+0576), while the -- Greek "µ" (micro sign, U+00B5) is case folded to "μ" (small letter mu, -- U+03BC) instead of itself. toCaseFold :: Text -> Text -- | O(n) Convert a string to lower case, using simple case -- conversion. Subject to fusion. -- -- The result string may be longer than the input string. For instance, -- "İ" (Latin capital letter I with dot above, U+0130) maps to the -- sequence "i" (Latin small letter i, U+0069) followed by " ̇" -- (combining dot above, U+0307). toLower :: Text -> Text -- | O(n) Convert a string to upper case, using simple case -- conversion. Subject to fusion. -- -- The result string may be longer than the input string. For instance, -- the German "ß" (eszett, U+00DF) maps to the two-letter sequence "SS". toUpper :: Text -> Text -- | O(n) Convert a string to title case, using simple case -- conversion. Subject to fusion. -- -- The first letter of the input is converted to title case, as is every -- subsequent letter that immediately follows a non-letter. Every letter -- that immediately follows another letter is converted to lower case. -- -- The result string may be longer than the input string. For example, -- the Latin small ligature fl (U+FB02) is converted to the sequence Latin -- capital letter F (U+0046) followed by Latin small letter l (U+006C). -- -- Note: this function does not take language or culture specific -- rules into account. For instance, in English, different style guides -- disagree on whether the book name "The Hill of the Red Fox" is -- correctly title cased—but this function will capitalize every -- word. toTitle :: Text -> Text instance SDP.Nullable.Nullable Data.Text.Internal.Text instance SDP.Estimate.Estimate Data.Text.Internal.Text instance SDP.Linear.Bordered Data.Text.Internal.Text GHC.Types.Int instance SDP.Linear.Linear Data.Text.Internal.Text GHC.Types.Char instance SDP.Linear.Split Data.Text.Internal.Text GHC.Types.Char instance SDP.Map.Map Data.Text.Internal.Text GHC.Types.Int GHC.Types.Char instance SDP.Indexed.Indexed Data.Text.Internal.Text GHC.Types.Int GHC.Types.Char instance SDP.IndexedM.Thaw (GHC.ST.ST s) Data.Text.Internal.Text (SDP.Prim.SBytes.STBytes# s GHC.Types.Char) instance SDP.Indexed.Freeze (GHC.ST.ST s) (SDP.Prim.SBytes.STBytes# s GHC.Types.Char) Data.Text.Internal.Text instance Control.Monad.IO.Class.MonadIO io => SDP.IndexedM.Thaw io Data.Text.Internal.Text (SDP.Prim.SBytes.MIOBytes# io GHC.Types.Char) instance Control.Monad.IO.Class.MonadIO io => SDP.Indexed.Freeze io (SDP.Prim.SBytes.MIOBytes# io GHC.Types.Char) Data.Text.Internal.Text instance System.IO.Classes.IsFile Data.Text.Internal.Text instance System.IO.Classes.IsTextFile Data.Text.Internal.Text -- | SDP.Text.Lazy provides sdp instances for lazy -- Text. module SDP.Text.Lazy -- | Text alias, may reduce ambiguity. type LText = Text data Text -- | O(n) Convert a string to folded case. Subject to fusion. -- -- This function is mainly useful for performing caseless (or case -- insensitive) string comparisons. -- -- A string x is a caseless match for a string y if and -- only if: -- --
--   toCaseFold x == toCaseFold y
--   
-- -- The result string may be longer than the input string, and may differ -- from applying toLower to the input string. For instance, the -- Armenian small ligature men now (U+FB13) is case folded to the bigram -- men now (U+0574 U+0576), while the micro sign (U+00B5) is case folded -- to the Greek small letter letter mu (U+03BC) instead of itself. toCaseFold :: Text -> Text -- | O(n) Convert a string to lower case, using simple case -- conversion. Subject to fusion. -- -- The result string may be longer than the input string. For instance, -- the Latin capital letter I with dot above (U+0130) maps to the -- sequence Latin small letter i (U+0069) followed by combining dot above -- (U+0307). toLower :: Text -> Text -- | O(n) Convert a string to upper case, using simple case -- conversion. Subject to fusion. -- -- The result string may be longer than the input string. For instance, -- the German eszett (U+00DF) maps to the two-letter sequence SS. toUpper :: Text -> Text -- | O(n) Convert a string to title case, using simple case -- conversion. Subject to fusion. -- -- The first letter of the input is converted to title case, as is every -- subsequent letter that immediately follows a non-letter. Every letter -- that immediately follows another letter is converted to lower case. -- -- The result string may be longer than the input string. For example, -- the Latin small ligature fl (U+FB02) is converted to the sequence Latin -- capital letter F (U+0046) followed by Latin small letter l (U+006C). -- -- Note: this function does not take language or culture specific -- rules into account. For instance, in English, different style guides -- disagree on whether the book name "The Hill of the Red Fox" is -- correctly title cased—but this function will capitalize every -- word. toTitle :: Text -> Text -- | O(c) Convert a list of strict Texts into a lazy -- Text. fromChunks :: [Text] -> Text -- | O(n) Convert a lazy Text into a list of strict -- Texts. toChunks :: Text -> [Text] -- | O(n) Convert a lazy Text into a strict Text. toStrict :: Text -> Text -- | O(c) Convert a strict Text into a lazy Text. fromStrict :: Text -> Text -- | Consume the chunks of a lazy Text with a natural right fold. foldrChunks :: (Text -> a -> a) -> a -> Text -> a -- | Consume the chunks of a lazy Text with a strict, -- tail-recursive, accumulating left fold. foldlChunks :: (a -> Text -> a) -> a -> Text -> a instance SDP.Nullable.Nullable Data.Text.Internal.Lazy.Text instance SDP.Estimate.Estimate Data.Text.Internal.Lazy.Text instance SDP.Linear.Bordered Data.Text.Internal.Lazy.Text GHC.Types.Int instance SDP.Linear.Linear Data.Text.Internal.Lazy.Text GHC.Types.Char instance SDP.Linear.Split Data.Text.Internal.Lazy.Text GHC.Types.Char instance SDP.Map.Map Data.Text.Internal.Lazy.Text GHC.Types.Int GHC.Types.Char instance SDP.Indexed.Indexed Data.Text.Internal.Lazy.Text GHC.Types.Int GHC.Types.Char instance SDP.IndexedM.Thaw (GHC.ST.ST s) Data.Text.Internal.Lazy.Text (SDP.ByteList.STUblist.STUblist s GHC.Types.Char) instance SDP.Indexed.Freeze (GHC.ST.ST s) (SDP.ByteList.STUblist.STUblist s GHC.Types.Char) Data.Text.Internal.Lazy.Text instance Control.Monad.IO.Class.MonadIO io => SDP.IndexedM.Thaw io Data.Text.Internal.Lazy.Text (SDP.ByteList.IOUblist.MIOUblist io GHC.Types.Char) instance Control.Monad.IO.Class.MonadIO io => SDP.Indexed.Freeze io (SDP.ByteList.IOUblist.MIOUblist io GHC.Types.Char) Data.Text.Internal.Lazy.Text instance System.IO.Classes.IsFile Data.Text.Internal.Lazy.Text instance System.IO.Classes.IsTextFile Data.Text.Internal.Lazy.Text -- | SDP.Text.Builder provides sdp instances for text -- Builder. -- -- Note that Builder is a service type for efficient Text -- creation which isn't intended for element-wise operations and content -- changes. Linear instance provided for convenience and many -- functions (folds, selections, etc.) creates intermediate structures -- (text, string, etc.). module SDP.Text.Builder -- | A Builder is an efficient way to build lazy Text -- values. There are several functions for constructing builders, but -- only one to inspect them: to extract any data, you have to turn them -- into lazy Text values using toLazyText. -- -- Internally, a builder constructs a lazy Text by filling -- arrays piece by piece. As each buffer is filled, it is 'popped' off, -- to become a new chunk of the resulting lazy Text. All this is -- hidden from the user of the Builder. data Builder -- | O(1). A Builder taking a Text, satisfying -- -- fromText :: Text -> Builder -- | O(n). Extract a lazy Text from a Builder with -- a default buffer size. The construction work takes place if and when -- the relevant part of the lazy Text is demanded. toLazyText :: Builder -> Text -- | O(1). A Builder taking a lazy Text, -- satisfying -- -- fromLazyText :: Text -> Builder -- | O(1). Pop the strict Text we have constructed so far, -- if any, yielding a new chunk in the result lazy Text. flush :: Builder instance SDP.Nullable.Nullable Data.Text.Internal.Builder.Builder instance SDP.Linear.Linear Data.Text.Internal.Builder.Builder GHC.Types.Char instance System.IO.Classes.IsFile Data.Text.Internal.Builder.Builder instance System.IO.Classes.IsTextFile Data.Text.Internal.Builder.Builder