From: Evgenii Akentev Date: Sun, 23 Jul 2023 16:22:26 +0000 (+0400) Subject: Add comment about internal representation X-Git-Url: https://git.ak3n.com/?a=commitdiff_plain;ds=inline;p=line-indexed-cursor.git Add comment about internal representation --- diff --git a/src/System/IO/LineIndexedCursor.hs b/src/System/IO/LineIndexedCursor.hs index f720038..f7a26b3 100644 --- a/src/System/IO/LineIndexedCursor.hs +++ b/src/System/IO/LineIndexedCursor.hs @@ -10,6 +10,10 @@ -- -- Lazily builds the index with the line numbers while reading the file -- making it possible to rewind to them quickly later. +-- +-- The indices are stored using a list, with a fixed length capacity, and 'Data.Array'. +-- Each new element is added to the list and when the capacity is reached, the list items get flushed +-- to the array for faster access. The list's capacity can be configured using 'mkLineIndexedCursorWithCapacity'. ----------------------------------------------------------------------------- module System.IO.LineIndexedCursor