-- Hoogle documentation, generated by Haddock -- See Hoogle, http://www.haskell.org/hoogle/ -- | Difference strings. -- -- Difference strings: a data structure for O(1) append on strings. Note -- that a DString is just a newtype wrapper around a 'DList Char'. The -- reason we need a new type instead of just a type synonym is that we -- can have an 'instance IsString DString' so we can write overloaded -- string literals of type DString. @package dstring @version 0.1 -- | Difference strings: a data structure for O(1) append on strings. Note -- that a DString is just a newtype wrapper around a 'DList Char'. The -- reason we need a new type instead of just a type synonym is that we -- can have an 'instance IsString DString' so we can write overloaded -- string literals of type DString. module Data.DString data DString -- | Convert a difference list of Chars to a difference string fromDList :: DList Char -> DString -- | Convert a difference string to a difference list toDList :: DString -> DList Char -- | Convert a difference string back to a normal String toString :: DString -> String -- | Convert a ShowS to a difference string fromShowS :: ShowS -> DString -- | Convert a difference string to a ShowS toShowS :: DString -> ShowS -- | Create a difference string containing no characters empty :: DString -- | Build a difference string from a single Char singleton :: Char -> DString -- | O(1), Prepend a Char to a difference string cons :: Char -> DString -> DString -- | O(1), Append a Char to a difference string snoc :: DString -> Char -> DString -- | O(1), Appending difference strings append :: DString -> DString -> DString -- | O(spine), Concatenate difference strings concat :: [DString] -> DString -- | O(length ds), difference list elimination, head, tail. list :: b -> (Char -> DString -> b) -> DString -> b -- | Return the head of the difference string head :: DString -> Char -- | Return the tail of the difference string tail :: DString -> DString -- | Unfoldr for difference strings unfoldr :: (b -> Maybe (Char, b)) -> b -> DString -- | Foldr over difference strings foldr :: (Char -> b -> b) -> b -> DString -> b instance IsString DString instance Monoid DString