X-Git-Url: http://git.megacz.com/?a=blobdiff_plain;f=Data%2FPackedString.hs;h=1160d34366db576bde963d7d6b364072c9d778da;hb=a70f356e023abdd0abb130cc149b0e3de7469044;hp=58c4981628823468f8dc3e88e1d0e5c5601df46e;hpb=c38b85c987b9b1f9d9d57fe613b84bb12ca9fb0f;p=haskell-directory.git diff --git a/Data/PackedString.hs b/Data/PackedString.hs index 58c4981..1160d34 100644 --- a/Data/PackedString.hs +++ b/Data/PackedString.hs @@ -8,14 +8,20 @@ -- Stability : experimental -- Portability : portable -- --- An efficient implementation of strings. +-- 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. -- ----------------------------------------------------------------------------- -- Original GHC implementation by Bryan O\'Sullivan, -- rewritten to use UArray by Simon Marlow. -module Data.PackedString ( +module Data.PackedString + {-# DEPRECATED "use Data.ByteString, Data.ByteString.Char8, or plain String." #-} + ( -- * The @PackedString@ type PackedString, -- abstract, instances: Eq, Ord, Show, Typeable @@ -266,7 +272,7 @@ joinPS filler pss = concatPS (splice pss) * joinPS (packString [x]) (splitPS x ls) = ls -} --- | The 'splitPS' function splits the input string on each occurance of the given 'Char'. +-- | The 'splitPS' function splits the input string on each occurrence of the given 'Char'. splitPS :: Char -> PackedString -> [PackedString] splitPS c = splitWithPS (== c) @@ -314,7 +320,7 @@ substrPS (PS ps) begin end = packString [ ps ! i | i <- [begin..end] ] -- | 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 signficant +-- 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 () hPutPS h (PS ps) = do