@@ -46,9 +46,13 @@ module Language.LSP.VFS
46
46
47
47
-- * Positions and transformations
48
48
, CodePointPosition (.. )
49
+ , line
50
+ , character
49
51
, codePointPositionToPosition
50
52
, positionToCodePointPosition
51
53
, CodePointRange (.. )
54
+ , start
55
+ , end
52
56
, codePointRangeToRange
53
57
, rangeToCodePointRange
54
58
@@ -80,7 +84,7 @@ import Data.Maybe
80
84
import qualified Data.Text.Rope as URope
81
85
import Data.Text.Utf16.Rope ( Rope )
82
86
import qualified Data.Text.Utf16.Rope as Rope
83
- import Data.Text.Prettyprint.Doc
87
+ import Data.Text.Prettyprint.Doc hiding ( line )
84
88
import qualified Language.LSP.Types as J
85
89
import qualified Language.LSP.Types.Lens as J
86
90
import System.FilePath
@@ -373,6 +377,9 @@ data CodePointRange =
373
377
, _end :: CodePointPosition -- ^ The range's end position.
374
378
} deriving (Show , Read , Eq , Ord )
375
379
380
+ makeFieldsNoPrefix ''CodePointPosition
381
+ makeFieldsNoPrefix ''CodePointRange
382
+
376
383
{- Note [Converting between code points and code units]
377
384
This is inherently a somewhat expensive operation, but we take some care to minimize the cost.
378
385
In particular, we use the good asymptotics of 'Rope' to our advantage:
0 commit comments