ghcide-1.0.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

mkDelta :: [TextDocumentContentChangeEvent] -> PositionDelta Source #

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