Safe Haskell | Safe-Inferred |
---|---|
Language | GHC2021 |
Provide mapping between position in stale content and current.
Synopsis
- mappingFromDiff :: [Text] -> [Text] -> PositionMapping
- data PositionMapping
- toStalePos :: Maybe PositionMapping -> Pos -> Maybe Pos
- toCurrentLoc :: Maybe PositionMapping -> Loc -> Maybe Loc
- data StaleFile = StaleFile {}
Documentation
mappingFromDiff :: [Text] -> [Text] -> PositionMapping Source #
Compute PositionMapping using the diff between two texts.
data PositionMapping Source #
A mapping between current file content and the stale (last successful compiled) file content. Currently, only supports entire line mapping, more detailed mapping might be achieved via referring to haskell-language-server@efb4b94
Instances
Show PositionMapping Source # | |
Defined in Futhark.LSP.PositionMapping showsPrec :: Int -> PositionMapping -> ShowS # show :: PositionMapping -> String # showList :: [PositionMapping] -> ShowS # |
toStalePos :: Maybe PositionMapping -> Pos -> Maybe Pos Source #
Transform current Pos to the stale pos for query Note: line and col in Pos is larger by one
toCurrentLoc :: Maybe PositionMapping -> Loc -> Maybe Loc Source #
Transform stale Loc gotten from stale AST to current Loc.
Stale pretty document stored in state.
StaleFile | |
|