Ide.Plugin.SemanticTokens.Types

haskell-language-server-2.9.0.0: LSP server for GHC

Safe Haskell | None
Language | GHC2021

Ide.Plugin.SemanticTokens.Types

Synopsis

- data HsSemanticTokenType
  - = TVariable
  - | TFunction
  - | TDataConstructor
  - | TTypeVariable
  - | TClassMethod
  - | TPatternSynonym
  - | TTypeConstructor
  - | TClass
  - | TTypeSynonym
  - | TTypeFamily
  - | TRecordField
  - | TOperator
  - | TModule
- data SemanticTokensConfig = STC {
  - stFunction :: !SemanticTokenTypes
  - stVariable :: !SemanticTokenTypes
  - stDataConstructor :: !SemanticTokenTypes
  - stTypeVariable :: !SemanticTokenTypes
  - stClassMethod :: !SemanticTokenTypes
  - stPatternSynonym :: !SemanticTokenTypes
  - stTypeConstructor :: !SemanticTokenTypes
  - stClass :: !SemanticTokenTypes
  - stTypeSynonym :: !SemanticTokenTypes
  - stTypeFamily :: !SemanticTokenTypes
  - stRecordField :: !SemanticTokenTypes
  - stModule :: !SemanticTokenTypes
  - stOperator :: !SemanticTokenTypes
  }
- data SemanticTokenOriginal tokenType = SemanticTokenOriginal {
  - _tokenType :: tokenType
  - _loc :: Loc
  - _name :: String
  }
- data Loc = Loc {
  - _line :: UInt
  - _startChar :: UInt
  - _len :: UInt
  }
- data GetSemanticTokens = GetSemanticTokens
- type RangeSemanticTokenTypeList = [(Range, HsSemanticTokenType)]
- newtype RangeHsSemanticTokenTypes = RangeHsSemanticTokenTypes {
  - rangeSemanticList :: RangeSemanticTokenTypeList
  }
- showRangeToken :: (Range, HsSemanticTokenType) -> String
- showRange :: Range -> String
- data HieFunMaskKind kind where
  - HieFreshFun :: HieFunMaskKind Type
  - HieFromDiskFun :: Array TypeIndex Bool -> HieFunMaskKind Int
- data SemanticLog
  - = LogShake Log
  - | LogDependencyError PluginError
  - | LogNoAST FilePath
  - | LogConfig SemanticTokensConfig
  - | LogMsg String
  - | LogNoVF
  - | LogSemanticTokensDeltaMisMatch Text (Maybe Text)
- type SemanticTokenId = Text

# Documentation

data HsSemanticTokenType #

Constructors

TVariable |
TFunction |
TDataConstructor |
TTypeVariable |
TClassMethod |
TPatternSynonym |
TTypeConstructor |
TClass |
TTypeSynonym |
TTypeFamily |
TRecordField |
TOperator |
TModule |

#### Instances

Instances details

Semigroup HsSemanticTokenType # |
Instance details Defined in Ide.Plugin.SemanticTokens.Types Methods (<>) :: HsSemanticTokenType -> HsSemanticTokenType -> HsSemanticTokenType # sconcat :: NonEmpty HsSemanticTokenType -> HsSemanticTokenType # stimes :: Integral b => b -> HsSemanticTokenType -> HsSemanticTokenType #
Bounded HsSemanticTokenType # |
Instance details Defined in Ide.Plugin.SemanticTokens.Types Methods minBound :: HsSemanticTokenType # maxBound :: HsSemanticTokenType #
Enum HsSemanticTokenType # |
Instance details Defined in Ide.Plugin.SemanticTokens.Types Methods succ :: HsSemanticTokenType -> HsSemanticTokenType # pred :: HsSemanticTokenType -> HsSemanticTokenType # toEnum :: Int -> HsSemanticTokenType # fromEnum :: HsSemanticTokenType -> Int # enumFrom :: HsSemanticTokenType -> [HsSemanticTokenType] # enumFromThen :: HsSemanticTokenType -> HsSemanticTokenType -> [HsSemanticTokenType] # enumFromTo :: HsSemanticTokenType -> HsSemanticTokenType -> [HsSemanticTokenType] # enumFromThenTo :: HsSemanticTokenType -> HsSemanticTokenType -> HsSemanticTokenType -> [HsSemanticTokenType] #
Generic HsSemanticTokenType # |
Instance details Defined in Ide.Plugin.SemanticTokens.Types Associated Types
type Rep HsSemanticTokenType |
Instance details Defined in Ide.Plugin.SemanticTokens.Types type Rep HsSemanticTokenType = D1 ('MetaData "HsSemanticTokenType" "Ide.Plugin.SemanticTokens.Types" "haskell-language-server-2.9.0.0-BHsh6lg6RcgcExK8DswZ8-hls-semantic-tokens-plugin" 'False) (((C1 ('MetaCons "TVariable" 'PrefixI 'False) (U1 :: Type -> Type) :+: (C1 ('MetaCons "TFunction" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "TDataConstructor" 'PrefixI 'False) (U1 :: Type -> Type))) :+: (C1 ('MetaCons "TTypeVariable" 'PrefixI 'False) (U1 :: Type -> Type) :+: (C1 ('MetaCons "TClassMethod" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "TPatternSynonym" 'PrefixI 'False) (U1 :: Type -> Type)))) :+: ((C1 ('MetaCons "TTypeConstructor" 'PrefixI 'False) (U1 :: Type -> Type) :+: (C1 ('MetaCons "TClass" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "TTypeSynonym" 'PrefixI 'False) (U1 :: Type -> Type))) :+: ((C1 ('MetaCons "TTypeFamily" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "TRecordField" 'PrefixI 'False) (U1 :: Type -> Type)) :+: (C1 ('MetaCons "TOperator" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "TModule" 'PrefixI 'False) (U1 :: Type -> Type)))))
Methods from :: HsSemanticTokenType -> Rep HsSemanticTokenType x # to :: Rep HsSemanticTokenType x -> HsSemanticTokenType #
Show HsSemanticTokenType # |
Instance details Defined in Ide.Plugin.SemanticTokens.Types Methods showsPrec :: Int -> HsSemanticTokenType -> ShowS # show :: HsSemanticTokenType -> String # showList :: [HsSemanticTokenType] -> ShowS #
Eq HsSemanticTokenType # |
Instance details Defined in Ide.Plugin.SemanticTokens.Types Methods (==) :: HsSemanticTokenType -> HsSemanticTokenType -> Bool # (/=) :: HsSemanticTokenType -> HsSemanticTokenType -> Bool #
Ord HsSemanticTokenType # |
Instance details Defined in Ide.Plugin.SemanticTokens.Types Methods compare :: HsSemanticTokenType -> HsSemanticTokenType -> Ordering # (<) :: HsSemanticTokenType -> HsSemanticTokenType -> Bool # (<=) :: HsSemanticTokenType -> HsSemanticTokenType -> Bool # (>) :: HsSemanticTokenType -> HsSemanticTokenType -> Bool # (>=) :: HsSemanticTokenType -> HsSemanticTokenType -> Bool # max :: HsSemanticTokenType -> HsSemanticTokenType -> HsSemanticTokenType # min :: HsSemanticTokenType -> HsSemanticTokenType -> HsSemanticTokenType #
Lift HsSemanticTokenType # |
Instance details Defined in Ide.Plugin.SemanticTokens.Types Methods lift :: Quote m => HsSemanticTokenType -> m Exp # liftTyped :: forall (m :: Type -> Type). Quote m => HsSemanticTokenType -> Code m HsSemanticTokenType #
type Rep HsSemanticTokenType # |
Instance details Defined in Ide.Plugin.SemanticTokens.Types type Rep HsSemanticTokenType = D1 ('MetaData "HsSemanticTokenType" "Ide.Plugin.SemanticTokens.Types" "haskell-language-server-2.9.0.0-BHsh6lg6RcgcExK8DswZ8-hls-semantic-tokens-plugin" 'False) (((C1 ('MetaCons "TVariable" 'PrefixI 'False) (U1 :: Type -> Type) :+: (C1 ('MetaCons "TFunction" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "TDataConstructor" 'PrefixI 'False) (U1 :: Type -> Type))) :+: (C1 ('MetaCons "TTypeVariable" 'PrefixI 'False) (U1 :: Type -> Type) :+: (C1 ('MetaCons "TClassMethod" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "TPatternSynonym" 'PrefixI 'False) (U1 :: Type -> Type)))) :+: ((C1 ('MetaCons "TTypeConstructor" 'PrefixI 'False) (U1 :: Type -> Type) :+: (C1 ('MetaCons "TClass" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "TTypeSynonym" 'PrefixI 'False) (U1 :: Type -> Type))) :+: ((C1 ('MetaCons "TTypeFamily" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "TRecordField" 'PrefixI 'False) (U1 :: Type -> Type)) :+: (C1 ('MetaCons "TOperator" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "TModule" 'PrefixI 'False) (U1 :: Type -> Type)))))

data SemanticTokensConfig #

SemanticTokensConfig_ is a configuration for the semantic tokens plugin. it contains map between the hs semantic token type and default token type.

Constructors

STC |
Fields stFunction :: !SemanticTokenTypes stVariable :: !SemanticTokenTypes stDataConstructor :: !SemanticTokenTypes stTypeVariable :: !SemanticTokenTypes stClassMethod :: !SemanticTokenTypes stPatternSynonym :: !SemanticTokenTypes stTypeConstructor :: !SemanticTokenTypes stClass :: !SemanticTokenTypes stTypeSynonym :: !SemanticTokenTypes stTypeFamily :: !SemanticTokenTypes stRecordField :: !SemanticTokenTypes stModule :: !SemanticTokenTypes stOperator :: !SemanticTokenTypes

#### Instances

Instances details

Default SemanticTokensConfig # |
Instance details Defined in Ide.Plugin.SemanticTokens.Types Methods def :: SemanticTokensConfig #
Generic SemanticTokensConfig # |
Instance details Defined in Ide.Plugin.SemanticTokens.Types Associated Types
type Rep SemanticTokensConfig |
Instance details Defined in Ide.Plugin.SemanticTokens.Types type Rep SemanticTokensConfig = D1 ('MetaData "SemanticTokensConfig" "Ide.Plugin.SemanticTokens.Types" "haskell-language-server-2.9.0.0-BHsh6lg6RcgcExK8DswZ8-hls-semantic-tokens-plugin" 'False) (C1 ('MetaCons "STC" 'PrefixI 'True) (((S1 ('MetaSel ('Just "stFunction") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 SemanticTokenTypes) :*: (S1 ('MetaSel ('Just "stVariable") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 SemanticTokenTypes) :*: S1 ('MetaSel ('Just "stDataConstructor") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 SemanticTokenTypes))) :*: (S1 ('MetaSel ('Just "stTypeVariable") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 SemanticTokenTypes) :*: (S1 ('MetaSel ('Just "stClassMethod") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 SemanticTokenTypes) :*: S1 ('MetaSel ('Just "stPatternSynonym") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 SemanticTokenTypes)))) :*: ((S1 ('MetaSel ('Just "stTypeConstructor") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 SemanticTokenTypes) :*: (S1 ('MetaSel ('Just "stClass") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 SemanticTokenTypes) :*: S1 ('MetaSel ('Just "stTypeSynonym") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 SemanticTokenTypes))) :*: ((S1 ('MetaSel ('Just "stTypeFamily") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 SemanticTokenTypes) :*: S1 ('MetaSel ('Just "stRecordField") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 SemanticTokenTypes)) :*: (S1 ('MetaSel ('Just "stModule") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 SemanticTokenTypes) :*: S1 ('MetaSel ('Just "stOperator") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 SemanticTokenTypes))))))
Methods from :: SemanticTokensConfig -> Rep SemanticTokensConfig x # to :: Rep SemanticTokensConfig x -> SemanticTokensConfig #
Show SemanticTokensConfig # |
Instance details Defined in Ide.Plugin.SemanticTokens.Types Methods showsPrec :: Int -> SemanticTokensConfig -> ShowS # show :: SemanticTokensConfig -> String # showList :: [SemanticTokensConfig] -> ShowS #
type Rep SemanticTokensConfig # |
Instance details Defined in Ide.Plugin.SemanticTokens.Types type Rep SemanticTokensConfig = D1 ('MetaData "SemanticTokensConfig" "Ide.Plugin.SemanticTokens.Types" "haskell-language-server-2.9.0.0-BHsh6lg6RcgcExK8DswZ8-hls-semantic-tokens-plugin" 'False) (C1 ('MetaCons "STC" 'PrefixI 'True) (((S1 ('MetaSel ('Just "stFunction") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 SemanticTokenTypes) :*: (S1 ('MetaSel ('Just "stVariable") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 SemanticTokenTypes) :*: S1 ('MetaSel ('Just "stDataConstructor") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 SemanticTokenTypes))) :*: (S1 ('MetaSel ('Just "stTypeVariable") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 SemanticTokenTypes) :*: (S1 ('MetaSel ('Just "stClassMethod") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 SemanticTokenTypes) :*: S1 ('MetaSel ('Just "stPatternSynonym") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 SemanticTokenTypes)))) :*: ((S1 ('MetaSel ('Just "stTypeConstructor") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 SemanticTokenTypes) :*: (S1 ('MetaSel ('Just "stClass") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 SemanticTokenTypes) :*: S1 ('MetaSel ('Just "stTypeSynonym") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 SemanticTokenTypes))) :*: ((S1 ('MetaSel ('Just "stTypeFamily") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 SemanticTokenTypes) :*: S1 ('MetaSel ('Just "stRecordField") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 SemanticTokenTypes)) :*: (S1 ('MetaSel ('Just "stModule") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 SemanticTokenTypes) :*: S1 ('MetaSel ('Just "stOperator") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 SemanticTokenTypes))))))

data SemanticTokenOriginal tokenType #

Constructors

SemanticTokenOriginal |
Fields _tokenType :: tokenType _loc :: Loc _name :: String

#### Instances

Instances details

Show tokenType => Show (SemanticTokenOriginal tokenType) # |
Instance details Defined in Ide.Plugin.SemanticTokens.Types Methods showsPrec :: Int -> SemanticTokenOriginal tokenType -> ShowS # show :: SemanticTokenOriginal tokenType -> String # showList :: [SemanticTokenOriginal tokenType] -> ShowS #
Eq tokenType => Eq (SemanticTokenOriginal tokenType) # |
Instance details Defined in Ide.Plugin.SemanticTokens.Types Methods (==) :: SemanticTokenOriginal tokenType -> SemanticTokenOriginal tokenType -> Bool # (/=) :: SemanticTokenOriginal tokenType -> SemanticTokenOriginal tokenType -> Bool #
Ord tokenType => Ord (SemanticTokenOriginal tokenType) # |
Instance details Defined in Ide.Plugin.SemanticTokens.Types Methods compare :: SemanticTokenOriginal tokenType -> SemanticTokenOriginal tokenType -> Ordering # (<) :: SemanticTokenOriginal tokenType -> SemanticTokenOriginal tokenType -> Bool # (<=) :: SemanticTokenOriginal tokenType -> SemanticTokenOriginal tokenType -> Bool # (>) :: SemanticTokenOriginal tokenType -> SemanticTokenOriginal tokenType -> Bool # (>=) :: SemanticTokenOriginal tokenType -> SemanticTokenOriginal tokenType -> Bool # max :: SemanticTokenOriginal tokenType -> SemanticTokenOriginal tokenType -> SemanticTokenOriginal tokenType # min :: SemanticTokenOriginal tokenType -> SemanticTokenOriginal tokenType -> SemanticTokenOriginal tokenType #

data Loc #

Constructors

Loc |
Fields _line :: UInt _startChar :: UInt _len :: UInt

#### Instances

Instances details

Show Loc # |
Instance details Defined in Ide.Plugin.SemanticTokens.Types Methods showsPrec :: Int -> Loc -> ShowS # show :: Loc -> String # showList :: [Loc] -> ShowS #
Eq Loc # |
Instance details Defined in Ide.Plugin.SemanticTokens.Types Methods (==) :: Loc -> Loc -> Bool # (/=) :: Loc -> Loc -> Bool #
Ord Loc # |
Instance details Defined in Ide.Plugin.SemanticTokens.Types Methods compare :: Loc -> Loc -> Ordering # (<) :: Loc -> Loc -> Bool # (<=) :: Loc -> Loc -> Bool # (>) :: Loc -> Loc -> Bool # (>=) :: Loc -> Loc -> Bool # max :: Loc -> Loc -> Loc # min :: Loc -> Loc -> Loc #

data GetSemanticTokens #

Constructors

GetSemanticTokens |

#### Instances

Instances details

NFData GetSemanticTokens # |
Instance details Defined in Ide.Plugin.SemanticTokens.Types Methods rnf :: GetSemanticTokens -> () #
Generic GetSemanticTokens # |
Instance details Defined in Ide.Plugin.SemanticTokens.Types Associated Types
type Rep GetSemanticTokens |
Instance details Defined in Ide.Plugin.SemanticTokens.Types type Rep GetSemanticTokens = D1 ('MetaData "GetSemanticTokens" "Ide.Plugin.SemanticTokens.Types" "haskell-language-server-2.9.0.0-BHsh6lg6RcgcExK8DswZ8-hls-semantic-tokens-plugin" 'False) (C1 ('MetaCons "GetSemanticTokens" 'PrefixI 'False) (U1 :: Type -> Type))
Methods from :: GetSemanticTokens -> Rep GetSemanticTokens x # to :: Rep GetSemanticTokens x -> GetSemanticTokens #
Show GetSemanticTokens # |
Instance details Defined in Ide.Plugin.SemanticTokens.Types Methods showsPrec :: Int -> GetSemanticTokens -> ShowS # show :: GetSemanticTokens -> String # showList :: [GetSemanticTokens] -> ShowS #
Eq GetSemanticTokens # |
Instance details Defined in Ide.Plugin.SemanticTokens.Types Methods (==) :: GetSemanticTokens -> GetSemanticTokens -> Bool # (/=) :: GetSemanticTokens -> GetSemanticTokens -> Bool #
Hashable GetSemanticTokens # |
Instance details Defined in Ide.Plugin.SemanticTokens.Types Methods hashWithSalt :: Int -> GetSemanticTokens -> Int # hash :: GetSemanticTokens -> Int #
type Rep GetSemanticTokens # |
Instance details Defined in Ide.Plugin.SemanticTokens.Types type Rep GetSemanticTokens = D1 ('MetaData "GetSemanticTokens" "Ide.Plugin.SemanticTokens.Types" "haskell-language-server-2.9.0.0-BHsh6lg6RcgcExK8DswZ8-hls-semantic-tokens-plugin" 'False) (C1 ('MetaCons "GetSemanticTokens" 'PrefixI 'False) (U1 :: Type -> Type))
type RuleResult GetSemanticTokens # |
Instance details Defined in Ide.Plugin.SemanticTokens.Types type RuleResult GetSemanticTokens = RangeHsSemanticTokenTypes

type RangeSemanticTokenTypeList = [(Range, HsSemanticTokenType)] #

newtype RangeHsSemanticTokenTypes #

Constructors

RangeHsSemanticTokenTypes |
Fields rangeSemanticList :: RangeSemanticTokenTypeList

#### Instances

Instances details

NFData RangeHsSemanticTokenTypes # |
Instance details Defined in Ide.Plugin.SemanticTokens.Types Methods rnf :: RangeHsSemanticTokenTypes -> () #
Show RangeHsSemanticTokenTypes # |
Instance details Defined in Ide.Plugin.SemanticTokens.Types Methods showsPrec :: Int -> RangeHsSemanticTokenTypes -> ShowS # show :: RangeHsSemanticTokenTypes -> String # showList :: [RangeHsSemanticTokenTypes] -> ShowS #

showRangeToken :: (Range, HsSemanticTokenType) -> String #

showRange :: Range -> String #

data HieFunMaskKind kind where #

Constructors

HieFreshFun :: HieFunMaskKind Type |
HieFromDiskFun :: Array TypeIndex Bool -> HieFunMaskKind Int |

data SemanticLog #

Constructors

LogShake Log |
LogDependencyError PluginError |
LogNoAST FilePath |
LogConfig SemanticTokensConfig |
LogMsg String |
LogNoVF |
LogSemanticTokensDeltaMisMatch Text (Maybe Text) |

#### Instances

Instances details

Pretty SemanticLog # |
Instance details Defined in Ide.Plugin.SemanticTokens.Types Methods pretty :: SemanticLog -> Doc ann # prettyList :: [SemanticLog] -> Doc ann #

type SemanticTokenId = Text #