ghcide-1.6.0.0: The core of an IDE
Safe HaskellNone
LanguageHaskell2010

Development.IDE.Core.PositionMapping

Synopsis

Documentation

data PositionResult a Source #

Either an exact position, or the range of text that was substituted

Constructors

PositionRange

Fields need to be non-strict otherwise bind is exponential

PositionExact !a 

Instances

Instances details
Monad PositionResult Source # 
Instance details

Defined in Development.IDE.Core.PositionMapping

Functor PositionResult Source # 
Instance details

Defined in Development.IDE.Core.PositionMapping

Methods

fmap :: (a -> b) -> PositionResult a -> PositionResult b #

(<$) :: a -> PositionResult b -> PositionResult a #

Applicative PositionResult Source # 
Instance details

Defined in Development.IDE.Core.PositionMapping

Eq a => Eq (PositionResult a) Source # 
Instance details

Defined in Development.IDE.Core.PositionMapping

Ord a => Ord (PositionResult a) Source # 
Instance details

Defined in Development.IDE.Core.PositionMapping

Show a => Show (PositionResult a) Source # 
Instance details

Defined in Development.IDE.Core.PositionMapping

addDelta :: PositionDelta -> PositionMapping -> PositionMapping Source #

Add a new delta onto a Mapping k n to make a Mapping (k - 1) n

composeDelta :: PositionDelta -> PositionDelta -> PositionDelta Source #

Compose two position mappings. Composes in the same way as function composition (ie the second argument is applyed to the position first).

mkDelta :: [TextDocumentContentChangeEvent] -> PositionDelta Source #

Convert a set of changes into a delta from k to k + 1