Safe Haskell | None |
---|---|
Language | Haskell2010 |
Synopsis
- newtype PositionMapping = PositionMapping PositionDelta
- fromCurrentPosition :: PositionMapping -> Position -> Maybe Position
- toCurrentPosition :: PositionMapping -> Position -> Maybe Position
- data PositionDelta = PositionDelta {}
- addDelta :: PositionDelta -> PositionMapping -> PositionMapping
- mkDelta :: [TextDocumentContentChangeEvent] -> PositionDelta
- toCurrentRange :: PositionMapping -> Range -> Maybe Range
- fromCurrentRange :: PositionMapping -> Range -> Maybe Range
- applyChange :: PositionDelta -> TextDocumentContentChangeEvent -> PositionDelta
- zeroMapping :: PositionMapping
- toCurrent :: Range -> Text -> Position -> Maybe Position
- fromCurrent :: Range -> Text -> Position -> Maybe Position
Documentation
toCurrentPosition :: PositionMapping -> Position -> Maybe Position Source #
data PositionDelta Source #
addDelta :: PositionDelta -> PositionMapping -> PositionMapping Source #
Add a new delta onto a Mapping k n to make a Mapping (k - 1) n
mkDelta :: [TextDocumentContentChangeEvent] -> PositionDelta Source #
Convert a set of changes into a delta from k to k + 1
toCurrentRange :: PositionMapping -> Range -> Maybe Range Source #
fromCurrentRange :: PositionMapping -> Range -> Maybe Range Source #