From c38b85c987b9b1f9d9d57fe613b84bb12ca9fb0f Mon Sep 17 00:00:00 2001 From: simonmar Date: Fri, 13 Aug 2004 10:55:06 +0000 Subject: [PATCH] [project @ 2004-08-13 10:55:06 by simonmar] Add a Todo --- Data/PackedString.hs | 5 +++++ 1 file changed, 5 insertions(+) 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 -- 1.7.10.4