Skip to content

Commit 5d174ac

Browse files
committed
standardize semantic token fields
1 parent abae6ad commit 5d174ac

File tree

1 file changed

+10
-10
lines changed

1 file changed

+10
-10
lines changed

lsp-types/src/Language/LSP/Protocol/Types/SemanticTokens.hs

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -39,22 +39,22 @@ defaultSemanticTokensLegend = SemanticTokensLegend
3939
-- | A single 'semantic token' as described in the LSP specification, using absolute positions.
4040
-- This is the kind of token that is usually easiest for editors to produce.
4141
data SemanticTokenAbsolute = SemanticTokenAbsolute {
42-
line :: UInt,
43-
startChar :: UInt,
44-
length :: UInt,
45-
tokenType :: SemanticTokenTypes,
46-
tokenModifiers :: [SemanticTokenModifiers]
42+
_line :: UInt,
43+
_startChar :: UInt,
44+
_length :: UInt,
45+
_tokenType :: SemanticTokenTypes,
46+
_tokenModifiers :: [SemanticTokenModifiers]
4747
} deriving stock (Show, Eq, Ord)
4848
-- Note: we want the Ord instance to sort the tokens textually: this is achieved due to the
4949
-- order of the constructors
5050

5151
-- | A single 'semantic token' as described in the LSP specification, using relative positions.
5252
data SemanticTokenRelative = SemanticTokenRelative {
53-
deltaLine :: UInt,
54-
deltaStartChar :: UInt,
55-
length :: UInt,
56-
tokenType :: SemanticTokenTypes,
57-
tokenModifiers :: [SemanticTokenModifiers]
53+
_deltaLine :: UInt,
54+
_deltaStartChar :: UInt,
55+
_length :: UInt,
56+
_tokenType :: SemanticTokenTypes,
57+
_tokenModifiers :: [SemanticTokenModifiers]
5858
} deriving stock (Show, Eq, Ord)
5959
-- Note: we want the Ord instance to sort the tokens textually: this is achieved due to the
6060
-- order of the constructors

0 commit comments

Comments
 (0)