haskell-language-server-2.9.0.0: LSP server for GHC
Safe HaskellSafe-Inferred
LanguageGHC2021

Ide.Plugin.CodeRange.Rules

Contents

Synopsis

Documentation

data CodeRange Source #

A tree representing code ranges in a file. This can be useful for features like selection range and folding range

Constructors

CodeRange 

Fields

Instances

Instances details
Generic CodeRange Source # 
Instance details

Defined in Ide.Plugin.CodeRange.Rules

Associated Types

type Rep CodeRange :: Type -> Type #

Show CodeRange Source # 
Instance details

Defined in Ide.Plugin.CodeRange.Rules

NFData CodeRange Source # 
Instance details

Defined in Ide.Plugin.CodeRange.Rules

Methods

rnf :: CodeRange -> () #

Eq CodeRange Source # 
Instance details

Defined in Ide.Plugin.CodeRange.Rules

Ord CodeRange Source # 
Instance details

Defined in Ide.Plugin.CodeRange.Rules

type Rep CodeRange Source # 
Instance details

Defined in Ide.Plugin.CodeRange.Rules

type Rep CodeRange = D1 ('MetaData "CodeRange" "Ide.Plugin.CodeRange.Rules" "haskell-language-server-2.9.0.0-4S5Vh3BPyyeJWzPv4aazqb-hls-code-range-plugin" 'False) (C1 ('MetaCons "CodeRange" 'PrefixI 'True) (S1 ('MetaSel ('Just "_codeRange_range") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Range) :*: (S1 ('MetaSel ('Just "_codeRange_children") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 (Vector CodeRange)) :*: S1 ('MetaSel ('Just "_codeRange_kind") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 CodeRangeKind))))

data CodeRangeKind Source #

CodeKind represents the kind of a code range

Constructors

CodeKindRegion

ordinary code

CodeKindImports

the group of imports

CodeKindComment

a comment

Instances

Instances details
Generic CodeRangeKind Source # 
Instance details

Defined in Ide.Plugin.CodeRange.Rules

Associated Types

type Rep CodeRangeKind :: Type -> Type #

Show CodeRangeKind Source # 
Instance details

Defined in Ide.Plugin.CodeRange.Rules

NFData CodeRangeKind Source # 
Instance details

Defined in Ide.Plugin.CodeRange.Rules

Methods

rnf :: CodeRangeKind -> () #

Eq CodeRangeKind Source # 
Instance details

Defined in Ide.Plugin.CodeRange.Rules

type Rep CodeRangeKind Source # 
Instance details

Defined in Ide.Plugin.CodeRange.Rules

type Rep CodeRangeKind = D1 ('MetaData "CodeRangeKind" "Ide.Plugin.CodeRange.Rules" "haskell-language-server-2.9.0.0-4S5Vh3BPyyeJWzPv4aazqb-hls-code-range-plugin" 'False) (C1 ('MetaCons "CodeKindRegion" 'PrefixI 'False) (U1 :: Type -> Type) :+: (C1 ('MetaCons "CodeKindImports" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "CodeKindComment" 'PrefixI 'False) (U1 :: Type -> Type)))

data GetCodeRange Source #

Constructors

GetCodeRange 

Instances

Instances details
Generic GetCodeRange Source # 
Instance details

Defined in Ide.Plugin.CodeRange.Rules

Associated Types

type Rep GetCodeRange :: Type -> Type #

Show GetCodeRange Source # 
Instance details

Defined in Ide.Plugin.CodeRange.Rules

NFData GetCodeRange Source # 
Instance details

Defined in Ide.Plugin.CodeRange.Rules

Methods

rnf :: GetCodeRange -> () #

Eq GetCodeRange Source # 
Instance details

Defined in Ide.Plugin.CodeRange.Rules

Hashable GetCodeRange Source # 
Instance details

Defined in Ide.Plugin.CodeRange.Rules

type Rep GetCodeRange Source # 
Instance details

Defined in Ide.Plugin.CodeRange.Rules

type Rep GetCodeRange = D1 ('MetaData "GetCodeRange" "Ide.Plugin.CodeRange.Rules" "haskell-language-server-2.9.0.0-4S5Vh3BPyyeJWzPv4aazqb-hls-code-range-plugin" 'False) (C1 ('MetaCons "GetCodeRange" 'PrefixI 'False) (U1 :: Type -> Type))
type RuleResult GetCodeRange Source # 
Instance details

Defined in Ide.Plugin.CodeRange.Rules

data Log Source #

Instances

Instances details
Show Log Source # 
Instance details

Defined in Ide.Plugin.CodeRange.Rules

Methods

showsPrec :: Int -> Log -> ShowS #

show :: Log -> String #

showList :: [Log] -> ShowS #

Pretty Log Source # 
Instance details

Defined in Ide.Plugin.CodeRange.Rules

Methods

pretty :: Log -> Doc ann #

prettyList :: [Log] -> Doc ann #

Internal

removeInterleaving :: [CodeRange] -> Writer [Log] [CodeRange] Source #

Remove interleaving of the list of CodeRanges.

simplify :: CodeRange -> CodeRange Source #

Remove redundant nodes in CodeRange tree

crkToFrk :: CodeRangeKind -> FoldingRangeKind Source #

Maps type CodeRangeKind to FoldingRangeKind