From: simonmar Date: Fri, 13 Aug 2004 10:55:06 +0000 (+0000) Subject: [project @ 2004-08-13 10:55:06 by simonmar] X-Git-Tag: nhc98-1-18-release~277 X-Git-Url: http://git.megacz.com/?a=commitdiff_plain;h=c38b85c987b9b1f9d9d57fe613b84bb12ca9fb0f;p=ghc-base.git [project @ 2004-08-13 10:55:06 by simonmar] Add a Todo --- diff --git a/Data/PackedString.hs b/Data/PackedString.hs index 0db102a..58c4981 100644 --- a/Data/PackedString.hs +++ b/Data/PackedString.hs @@ -83,6 +83,11 @@ import System.IO -- efficient operations. A 'PackedString' contains full Unicode 'Char's. newtype PackedString = PS (UArray Int Char) +-- ToDo: we could support "slices", i.e. include offset and length fields into +-- the string, so that operations like take/drop could be O(1). Perhaps making +-- a slice should be conditional on the ratio of the slice/string size to +-- limit memory leaks. + instance Eq PackedString where (PS x) == (PS y) = x == y