Copyright | © 2019 James Alexander Feldman-Crough |
---|---|
License | MPL-2.0 |
Safe Haskell | None |
Language | Haskell2010 |
Synopsis
- data LineMap
- lineOffsets :: LineMap -> [Offset]
- lineToOffset :: Line -> LineMap -> Maybe Offset
- offsetToLine :: Offset -> LineMap -> Line
- fromOffsets :: Foldable f => f Offset -> LineMap
Documentation
A dense vector containing offsets poiting to the start of each line. That is, the starting position of the third line of a file can be found at position 2.
lineOffsets :: LineMap -> [Offset] Source #