-- Hoogle documentation, generated by Haddock -- See Hoogle, http://www.haskell.org/hoogle/ -- | (Deprecated) Packed Strings. -- -- (Deprecated) Packed Strings. @package packedstring @version 0.1.0.0 -- | This API is deprecated. You might be able to use -- Data.ByteString or Data.ByteString.Char8, provided you -- don't need full Unicode support. The long term aim is to provide a -- Unicode layer on Data.ByteString, and then to provide a -- replacement for this Data.PackedString API based on that. module Data.PackedString -- | A space-efficient representation of a String, which supports -- various efficient operations. A PackedString contains full -- Unicode Chars. data PackedString -- | Convert a String into a PackedString packString :: String -> PackedString -- | Convert a PackedString into a String unpackPS :: PackedString -> String -- | Outputs a PackedString to the specified Handle. -- -- NOTE: the representation of the PackedString in the file is -- assumed to be in the ISO-8859-1 encoding. In other words, only the -- least significant byte is taken from each character in the -- PackedString. hPutPS :: Handle -> PackedString -> IO () -- | Read a PackedString directly from the specified Handle. -- This is far more efficient than reading the characters into a -- String and then using packString. -- -- NOTE: as with hPutPS, the string representation in the file is -- assumed to be ISO-8859-1. hGetPS :: Handle -> Int -> IO PackedString -- | The nilPS value is the empty string. nilPS :: PackedString -- | The consPS function prepends the given character to the given -- string. consPS :: Char -> PackedString -> PackedString -- | The headPS function returns the first element of a -- PackedString or throws an error if the string is empty. headPS :: PackedString -> Char -- | The tailPS function returns the tail of a PackedString -- or throws an error if the string is empty. tailPS :: PackedString -> PackedString -- | The nullPS function returns True iff the argument is null. nullPS :: PackedString -> Bool -- | The appendPS function appends the second string onto the first. appendPS :: PackedString -> PackedString -> PackedString -- | The lengthPS function returns the length of the input list. -- Analogous to length. lengthPS :: PackedString -> Int -- | The indexPS function returns the character in the string at the -- given position. indexPS :: PackedString -> Int -> Char -- | The mapPS function applies a function to each character in the -- string. mapPS :: (Char -> Char) -> PackedString -> PackedString -- | The filterPS function filters out the appropriate substring. filterPS :: (Char -> Bool) -> PackedString -> PackedString -- | The reversePS function reverses the string. reversePS :: PackedString -> PackedString -- | The concatPS function concatenates a list of -- PackedStrings. concatPS :: [PackedString] -> PackedString -- | The elemPS function returns True iff the given element is in -- the string. elemPS :: Char -> PackedString -> Bool -- | The substrPS function takes a PackedString and two -- indices and returns the substring of the input string between (and -- including) these indices. substrPS :: PackedString -> Int -> Int -> PackedString -- | The takePS function takes the first n characters of a -- PackedString. takePS :: Int -> PackedString -> PackedString -- | The dropPS function drops the first n characters of a -- PackedString. dropPS :: Int -> PackedString -> PackedString -- | The splitWithPS function splits a PackedString at a -- given index. splitAtPS :: Int -> PackedString -> (PackedString, PackedString) -- | The foldlPS function behaves like foldl on -- PackedStrings. foldlPS :: (a -> Char -> a) -> a -> PackedString -> a -- | The foldrPS function behaves like foldr on -- PackedStrings. foldrPS :: (Char -> a -> a) -> a -> PackedString -> a -- | The takeWhilePS function is analogous to the takeWhile -- function. takeWhilePS :: (Char -> Bool) -> PackedString -> PackedString -- | The dropWhilePS function is analogous to the dropWhile -- function. dropWhilePS :: (Char -> Bool) -> PackedString -> PackedString -- | The spanPS function returns a pair containing the result of -- running both takeWhilePS and dropWhilePS. spanPS :: (Char -> Bool) -> PackedString -> (PackedString, PackedString) -- | The breakPS function breaks a string at the first position -- which satisfies the predicate. breakPS :: (Char -> Bool) -> PackedString -> (PackedString, PackedString) -- | The linesPS function splits the input on line-breaks. linesPS :: PackedString -> [PackedString] -- | The unlinesPS function concatenates the input list after -- interspersing newlines. unlinesPS :: [PackedString] -> PackedString -- | The wordsPS function is analogous to the words function. wordsPS :: PackedString -> [PackedString] -- | The unwordsPS function is analogous to the unwords -- function. unwordsPS :: [PackedString] -> PackedString -- | The splitPS function splits the input string on each occurrence -- of the given Char. splitPS :: Char -> PackedString -> [PackedString] -- | The splitWithPS function takes a character predicate and splits -- the input string at each character which satisfies the predicate. splitWithPS :: (Char -> Bool) -> PackedString -> [PackedString] -- | The joinPS function takes a PackedString and a list of -- PackedStrings and concatenates the list after interspersing the -- first argument between each element of the list. joinPS :: PackedString -> [PackedString] -> PackedString instance Data PackedString instance Typeable PackedString instance Show PackedString instance Ord PackedString instance Eq PackedString