hls-code-range-plugin-2.4.0.0: HLS Plugin to support smart selection range and Folding range
Safe HaskellSafe-Inferred
LanguageHaskell2010

Ide.Plugin.CodeRange.Rules

Contents

Synopsis

Documentation

data CodeRange #

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 # 
Instance details

Defined in Ide.Plugin.CodeRange.Rules

Associated Types

type Rep CodeRange :: Type -> Type

Methods

from :: CodeRange -> Rep CodeRange x

to :: Rep CodeRange x -> CodeRange

Show CodeRange # 
Instance details

Defined in Ide.Plugin.CodeRange.Rules

Methods

showsPrec :: Int -> CodeRange -> ShowS #

show :: CodeRange -> String #

showList :: [CodeRange] -> ShowS #

NFData CodeRange # 
Instance details

Defined in Ide.Plugin.CodeRange.Rules

Methods

rnf :: CodeRange -> () #

Eq CodeRange # 
Instance details

Defined in Ide.Plugin.CodeRange.Rules

Methods

(==) :: CodeRange -> CodeRange -> Bool #

(/=) :: CodeRange -> CodeRange -> Bool #

Ord CodeRange # 
Instance details

Defined in Ide.Plugin.CodeRange.Rules

Methods

compare :: CodeRange -> CodeRange -> Ordering

(<) :: CodeRange -> CodeRange -> Bool

(<=) :: CodeRange -> CodeRange -> Bool

(>) :: CodeRange -> CodeRange -> Bool

(>=) :: CodeRange -> CodeRange -> Bool

max :: CodeRange -> CodeRange -> CodeRange

min :: CodeRange -> CodeRange -> CodeRange

type Rep CodeRange # 
Instance details

Defined in Ide.Plugin.CodeRange.Rules

type Rep CodeRange = D1 ('MetaData "CodeRange" "Ide.Plugin.CodeRange.Rules" "hls-code-range-plugin-2.4.0.0-AiN60Ym4QGI7QZa2YvfyAz" '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 #

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 # 
Instance details

Defined in Ide.Plugin.CodeRange.Rules

Associated Types

type Rep CodeRangeKind :: Type -> Type

Show CodeRangeKind # 
Instance details

Defined in Ide.Plugin.CodeRange.Rules

Methods

showsPrec :: Int -> CodeRangeKind -> ShowS #

show :: CodeRangeKind -> String #

showList :: [CodeRangeKind] -> ShowS #

NFData CodeRangeKind # 
Instance details

Defined in Ide.Plugin.CodeRange.Rules

Methods

rnf :: CodeRangeKind -> () #

Eq CodeRangeKind # 
Instance details

Defined in Ide.Plugin.CodeRange.Rules

type Rep CodeRangeKind # 
Instance details

Defined in Ide.Plugin.CodeRange.Rules

type Rep CodeRangeKind = D1 ('MetaData "CodeRangeKind" "Ide.Plugin.CodeRange.Rules" "hls-code-range-plugin-2.4.0.0-AiN60Ym4QGI7QZa2YvfyAz" '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 #

Constructors

GetCodeRange 

Instances

Instances details
Generic GetCodeRange # 
Instance details

Defined in Ide.Plugin.CodeRange.Rules

Associated Types

type Rep GetCodeRange :: Type -> Type

Show GetCodeRange # 
Instance details

Defined in Ide.Plugin.CodeRange.Rules

Methods

showsPrec :: Int -> GetCodeRange -> ShowS #

show :: GetCodeRange -> String #

showList :: [GetCodeRange] -> ShowS #

NFData GetCodeRange # 
Instance details

Defined in Ide.Plugin.CodeRange.Rules

Methods

rnf :: GetCodeRange -> () #

Eq GetCodeRange # 
Instance details

Defined in Ide.Plugin.CodeRange.Rules

Methods

(==) :: GetCodeRange -> GetCodeRange -> Bool #

(/=) :: GetCodeRange -> GetCodeRange -> Bool #

Hashable GetCodeRange # 
Instance details

Defined in Ide.Plugin.CodeRange.Rules

Methods

hashWithSalt :: Int -> GetCodeRange -> Int #

hash :: GetCodeRange -> Int #

type Rep GetCodeRange # 
Instance details

Defined in Ide.Plugin.CodeRange.Rules

type Rep GetCodeRange = D1 ('MetaData "GetCodeRange" "Ide.Plugin.CodeRange.Rules" "hls-code-range-plugin-2.4.0.0-AiN60Ym4QGI7QZa2YvfyAz" 'False) (C1 ('MetaCons "GetCodeRange" 'PrefixI 'False) (U1 :: Type -> Type))
type RuleResult GetCodeRange # 
Instance details

Defined in Ide.Plugin.CodeRange.Rules

data Log #

Instances

Instances details
Show Log # 
Instance details

Defined in Ide.Plugin.CodeRange.Rules

Methods

showsPrec :: Int -> Log -> ShowS #

show :: Log -> String #

showList :: [Log] -> ShowS #

Pretty Log # 
Instance details

Defined in Ide.Plugin.CodeRange.Rules

Methods

pretty :: Log -> Doc ann #

prettyList :: [Log] -> Doc ann #

Internal

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

Remove interleaving of the list of CodeRanges.

simplify :: CodeRange -> CodeRange #

Remove redundant nodes in CodeRange tree

crkToFrk :: CodeRangeKind -> FoldingRangeKind #

Maps type CodeRangeKind to FoldingRangeKind