@@ -46,9 +46,13 @@ module Language.LSP.VFS
4646
4747 -- * Positions and transformations
4848 , CodePointPosition (.. )
49+ , line
50+ , character
4951 , codePointPositionToPosition
5052 , positionToCodePointPosition
5153 , CodePointRange (.. )
54+ , start
55+ , end
5256 , codePointRangeToRange
5357 , rangeToCodePointRange
5458
@@ -80,7 +84,7 @@ import Data.Maybe
8084import qualified Data.Text.Rope as URope
8185import Data.Text.Utf16.Rope ( Rope )
8286import qualified Data.Text.Utf16.Rope as Rope
83- import Data.Text.Prettyprint.Doc
87+ import Data.Text.Prettyprint.Doc hiding ( line )
8488import qualified Language.LSP.Types as J
8589import qualified Language.LSP.Types.Lens as J
8690import System.FilePath
@@ -373,6 +377,9 @@ data CodePointRange =
373377 , _end :: CodePointPosition -- ^ The range's end position.
374378 } deriving (Show , Read , Eq , Ord )
375379
380+ makeFieldsNoPrefix ''CodePointPosition
381+ makeFieldsNoPrefix ''CodePointRange
382+
376383{- Note [Converting between code points and code units]
377384This is inherently a somewhat expensive operation, but we take some care to minimize the cost.
378385In particular, we use the good asymptotics of 'Rope' to our advantage:
0 commit comments