unison-cli-0.0.0
Safe HaskellSafe-Inferred
LanguageHaskell2010

Unison.LSP.Conversions

Synopsis

Documentation

rangeToInterval :: Range -> Interval Position Source #

uToLspPos :: Pos -> Position Source #

Convert a Unison file-position where the first char is 1 and line is 1, to an LSP Position where the first char is 0 and line is 0.

lspToUPos :: Position -> Pos Source #

Convert an LSP Position where the first char is 0 and line is 0, to a Unison file-position where the first char is 1 and line is 1.

uToLspRange :: Range -> Range Source #

Convert a Unison Range where the first char is 1 and line is 1, to an LSP Range where the first char is 0 and line is 0.

lspToURange :: Range -> Range Source #

Convert an LSP Range where the first char is 0 and line is 0, to a Unison Range where the first char is 1 and line is 1.