projects
/
line-indexed-cursor.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
43ba716
)
Add comment about internal representation
main
author
Evgenii Akentev
<i@ak3n.com>
Sun, 23 Jul 2023 16:22:26 +0000
(20:22 +0400)
committer
Evgenii Akentev
<i@ak3n.com>
Sun, 23 Jul 2023 16:22:26 +0000
(20:22 +0400)
src/System/IO/LineIndexedCursor.hs
patch
|
blob
|
blame
|
history
diff --git
a/src/System/IO/LineIndexedCursor.hs
b/src/System/IO/LineIndexedCursor.hs
index f7200383929e75b9bf63c04b6a265f61459cffe2..f7a26b35c3de10d32ab57db0600d1604fec54779 100644
(file)
--- 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.
--
-- 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
-----------------------------------------------------------------------------
module System.IO.LineIndexedCursor