Îõ³h$+Ù)òØ      !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVW(c) 2021-2022 Andrew LelechenkoBSD3/Andrew Lelechenko None Ç ú text-ropeRepresent a position in a text. text-ropeLine. text-ropeColumn in code points. text-ropeA wrapper around Xà for fast line/column navigation. Concatenation takes linear time.This is a building block for ,, which provides logarithmic concatenation. text-ropeExtract X, O(1). text-rope Create from X, linear time. text-rope$Check whether a text is empty, O(1). text-ropeEquivalent to  .  , but in O(1).:set -XOverloadedStringslengthInLines ""0lengthInLines "foo"1lengthInLines "foo\n"1lengthInLines "foo\n\n"2lengthInLines "foo\nbar"2  text-ropeSplit into lines by \n , similar to  Data.Text. !. Each line is produced in O(1).:set -XOverloadedStringslines ""[] lines "foo"["foo"] lines "foo\n"["foo"]lines "foo\n\n" ["foo",""]lines "foo\nbar" ["foo","bar"]  text-ropeSplit at given line, O(1).:set -XOverloadedStrings+map (\l -> splitAtLine l "foo\nbar") [0..3]Á[("","foo\nbar"),("foo\n","bar"),("foo\nbar",""),("foo\nbar","")]  text-rope"Length in code points, similar to  Data.Text. . Takes linear time.:set -XOverloadedStrings length "fÏ€€"3"Data.Text.Utf16.Lines.length "fÏ€€"4  text-ropeìMeasure text length as an amount of lines and columns. Time is proportional to the length of the last line.:set -XOverloadedStringslengthAsPosition "f€€"%Position {posLine = 0, posColumn = 2}lengthAsPosition "f\n€€"%Position {posLine = 1, posColumn = 1}lengthAsPosition "f\n€€\n"%Position {posLine = 2, posColumn = 0}  text-rope Span by a predicate, similar to  Data.Text. È. Takes linear (by length of the prefix satisfying the predicate) time. text-ropeCombination of   and subsequent . Time is linear in , but does not depend on .:set -XOverloadedStrings&splitAtPosition (Position 1 0) "f\n€€Ï" ("f\n","€€Ï")&splitAtPosition (Position 1 1) "f\n€€Ï" ("f\n€€","Ï")&splitAtPosition (Position 1 2) "f\n€€Ï" ("f\n€€Ï","")&splitAtPosition (Position 0 2) "f\n€€Ï" ("f\n","€€Ï")&splitAtPosition (Position 0 3) "f\n€€Ï" ("f\n€€","Ï")&splitAtPosition (Position 0 4) "f\n€€Ï" ("f\n€€Ï","") text-rope&Split at given code point, similar to  Data.Text. . Takes linear time.:set -XOverloadedStrings"map (\c -> splitAt c "fÏ€€") [0..4]8[("","fÏ€€"),("f","Ï€€"),("fÏ","€€"),("fÏ€€",""),("fÏ€€","")]Y text-rope!Associativity does not hold when  overflows.Z[ \]^_(c) 2021-2022 Andrew LelechenkoBSD3/Andrew Lelechenko None ƒ    (c) 2021-2022 Andrew LelechenkoBSD3/Andrew Lelechenko None2ÁÂÎÑàÊ  text-ropeRope of X' chunks with logarithmic concatenation. text-rope$Check whether a rope is empty, O(1). text-rope"Length in code points, similar to  Data.Text. , O(1).:set -XOverloadedStrings length "fÏ€€"3!Data.Text.Utf16.Rope.length "fÏ€€"4 text-rope splitAt c "fÏ€€") [0..4]8[("","fÏ€€"),("f","Ï€€"),("fÏ","€€"),("fÏ€€",""),("fÏ€€","")] text-rope&Split at given line, logarithmic time.:set -XOverloadedStrings+map (\l -> splitAtLine l "foo\nbar") [0..3]Á[("","foo\nbar"),("foo\n","bar"),("foo\nbar",""),("foo\nbar","")] text-ropeCombination of  and subsequent . Time is linear in  and logarithmic in .:set -XOverloadedStrings&splitAtPosition (Position 1 0) "f\n€€Ï" ("f\n","€€Ï")&splitAtPosition (Position 1 1) "f\n€€Ï" ("f\n€€","Ï")&splitAtPosition (Position 1 2) "f\n€€Ï" ("f\n€€Ï","")&splitAtPosition (Position 0 2) "f\n€€Ï" ("f\n","€€Ï")&splitAtPosition (Position 0 3) "f\n€€Ï" ("f\n€€","Ï")&splitAtPosition (Position 0 4) "f\n€€Ï" ("f\n€€Ï","")(c) 2021-2022 Andrew LelechenkoBSD3/Andrew Lelechenko None ÇÎ e& text-ropeRepresent a position in a text.( text-ropeLine.) text-ropeColumn in UTF-16 code units.* text-ropeA wrapper around Xà for fast line/column navigation. Concatenation takes linear time.This is a building block for ,, which provides logarithmic concatenation.+ text-rope Create from X, linear time., text-ropeExtract X, O(1).- text-rope$Check whether a text is empty, O(1).. text-ropeSplit into lines by \n , similar to  Data.Text. !. Each line is produced in O(1).:set -XOverloadedStringslines ""[] lines "foo"["foo"] lines "foo\n"["foo"]lines "foo\n\n" ["foo",""]lines "foo\nbar" ["foo","bar"]/ text-ropeEquivalent to  . ., but in O(1).:set -XOverloadedStringslengthInLines ""0lengthInLines "foo"1lengthInLines "foo\n"1lengthInLines "foo\n\n"2lengthInLines "foo\nbar"20 text-ropeSplit at given line, O(1).:set -XOverloadedStrings+map (\l -> splitAtLine l "foo\nbar") [0..3]Á[("","foo\nbar"),("foo\n","bar"),("foo\nbar",""),("foo\nbar","")]1 text-rope0Length in UTF-16 code units. Takes linear time.:set -XOverloadedStrings length "fÏ€€"4Data.Text.Lines.length "fÏ€€"32 text-ropeìMeasure text length as an amount of lines and columns. Time is proportional to the length of the last line.:set -XOverloadedStringslengthAsPosition "f€€"%Position {posLine = 0, posColumn = 3}lengthAsPosition "f\n€€"%Position {posLine = 1, posColumn = 2}lengthAsPosition "f\n€€\n"%Position {posLine = 2, posColumn = 0}3 text-ropeCombination of 0 and subsequent 4É. If requested number of code units splits a code point in half, return `. Time is linear in ), but does not depend on (.:set -XOverloadedStrings&splitAtPosition (Position 1 0) "f\n€€Ï"Just ("f\n","€€Ï")&splitAtPosition (Position 1 1) "f\n€€Ï"Nothing&splitAtPosition (Position 1 2) "f\n€€Ï"Just ("f\n€€","Ï")&splitAtPosition (Position 0 2) "f\n€€Ï"Just ("f\n","€€Ï")&splitAtPosition (Position 0 3) "f\n€€Ï"Nothing&splitAtPosition (Position 0 4) "f\n€€Ï"Just ("f\n€€","Ï")4 text-ropeèSplit at given UTF-16 code unit. If requested number of code units splits a code point in half, return `. Takes linear time.:set -XOverloadedStrings"map (\c -> splitAt c "fÏ€€") [0..4]É[Just ("","fÏ€€"),Just ("f","Ï€€"),Just ("fÏ","€€"),Nothing,Just ("fÏ€€","")]7 text-rope!Associativity does not hold when ( overflows.&'()*+,-./01234*+,-./014&'()23(c) 2021-2022 Andrew LelechenkoBSD3/Andrew Lelechenko None2ÁÂÎÑà)Ì B text-ropeRope of X' chunks with logarithmic concatenation.C text-rope$Check whether a rope is empty, O(1).D text-rope"Length in UTF-16 code units, O(1).:set -XOverloadedStrings length "fÏ€€"4Data.Text.Rope.length "fÏ€€"3E text-rope splitAt c "fÏ€€") [0..4]É[Just ("","fÏ€€"),Just ("f","Ï€€"),Just ("fÏ","€€"),Nothing,Just ("fÏ€€","")]M text-rope&Split at given line, logarithmic time.:set -XOverloadedStrings+map (\l -> splitAtLine l "foo\nbar") [0..3]Á[("","foo\nbar"),("foo\n","bar"),("foo\nbar",""),("foo\nbar","")]N text-ropeCombination of M and subsequent L. Time is linear in ) and logarithmic in (.:set -XOverloadedStrings&splitAtPosition (Position 1 0) "f\n€€Ï"Just ("f\n","€€Ï")&splitAtPosition (Position 1 1) "f\n€€Ï"Nothing&splitAtPosition (Position 1 2) "f\n€€Ï"Just ("f\n€€","Ï")&splitAtPosition (Position 0 2) "f\n€€Ï"Just ("f\n","€€Ï")&splitAtPosition (Position 0 3) "f\n€€Ï"Nothing&splitAtPosition (Position 0 4) "f\n€€Ï"Just ("f\n€€","Ï")&'()BCDEFGHIJKLMNBGFKJCHIMDL&'()ENá        !"    #$%&'()*+,-./   !"012%3456789:;$text-rope-0.1-EINadj2PHb7BdZiChJsFyhData.Text.LinesData.Text.RopeData.Text.Utf16.LinesData.Text.Utf16.RopeData.Text.Lines.InternalRope Data.Listlength Data.TextlinesspansplitAtPositionposLine posColumn TextLinestoTextfromTextnull lengthInLines splitAtLinelengthAsPositionsplitAtPosition fromTextLines toTextLines $fMonoidRope$fSemigroupRope$fIsStringRope $fShowRope $fOrdRope$fEqRope $fNFDataRope $fMonoidLines$fSemigroupLines$fShowTextLines$fMonoidPosition$fSemigroupPosition$fNFDataPosition $fEqPosition $fOrdPosition$fShowPosition $fEqTextLines$fOrdTextLines$fIsStringTextLines$fSemigroupTextLines$fMonoidTextLines$fNFDataTextLines text-1.2.3.2Data.Text.InternalText _nlIndices binarySearch intToWord wordToInt textLinesbase GHC.MaybeNothing