-- Hoogle documentation, generated by Haddock
-- See Hoogle, http://www.haskell.org/hoogle/
-- | HLS Plugin to support smart selection range
--
-- Please see the README on GitHub at
-- https://github.com/haskell/haskell-language-server#readme
@package hls-code-range-plugin
@version 1.0.0.0
module Ide.Plugin.CodeRange.Rules
-- | A tree representing code ranges in a file. This can be useful for
-- features like selection range and folding range
data CodeRange
CodeRange :: !Range -> !Vector CodeRange -> !CodeRangeKind -> CodeRange
-- | Range for current level
[_codeRange_range] :: CodeRange -> !Range
-- | A vector of children, sorted by their ranges in ascending order.
-- Children are guaranteed not to interleave, but some gaps may exist
-- among them.
[_codeRange_children] :: CodeRange -> !Vector CodeRange
[_codeRange_kind] :: CodeRange -> !CodeRangeKind
codeRange_range :: Lens' CodeRange Range
codeRange_children :: Lens' CodeRange (Vector CodeRange)
codeRange_kind :: Lens' CodeRange CodeRangeKind
-- | CodeKind represents the kind of a code range
data CodeRangeKind
-- | ordinary code
CodeKindRegion :: CodeRangeKind
-- | the group of imports
CodeKindImports :: CodeRangeKind
-- | a comment
CodeKindComment :: CodeRangeKind
data GetCodeRange
GetCodeRange :: GetCodeRange
codeRangeRule :: Recorder (WithPriority Log) -> Rules ()
data Log
LogShake :: Log -> Log
LogNoAST :: Log
LogFoundInterleaving :: CodeRange -> CodeRange -> Log
-- | Remove interleaving of the list of CodeRanges.
removeInterleaving :: [CodeRange] -> Writer [Log] [CodeRange]
-- | Remove redundant nodes in CodeRange tree
simplify :: CodeRange -> CodeRange
instance GHC.Generics.Generic Ide.Plugin.CodeRange.Rules.GetCodeRange
instance GHC.Show.Show Ide.Plugin.CodeRange.Rules.GetCodeRange
instance GHC.Classes.Eq Ide.Plugin.CodeRange.Rules.GetCodeRange
instance Data.Hashable.Class.Hashable Ide.Plugin.CodeRange.Rules.GetCodeRange
instance Control.DeepSeq.NFData Ide.Plugin.CodeRange.Rules.GetCodeRange
instance GHC.Classes.Eq Ide.Plugin.CodeRange.Rules.CodeRange
instance GHC.Classes.Ord Ide.Plugin.CodeRange.Rules.CodeRange
instance Control.DeepSeq.NFData Ide.Plugin.CodeRange.Rules.CodeRangeKind
instance GHC.Generics.Generic Ide.Plugin.CodeRange.Rules.CodeRangeKind
instance GHC.Show.Show Ide.Plugin.CodeRange.Rules.CodeRangeKind
instance Control.DeepSeq.NFData Ide.Plugin.CodeRange.Rules.CodeRange
instance GHC.Generics.Generic Ide.Plugin.CodeRange.Rules.CodeRange
instance GHC.Show.Show Ide.Plugin.CodeRange.Rules.CodeRange
instance GHC.Show.Show Ide.Plugin.CodeRange.Rules.Log
instance Prettyprinter.Internal.Pretty Ide.Plugin.CodeRange.Rules.Log
module Ide.Plugin.CodeRange
descriptor :: Recorder (WithPriority Log) -> PluginId -> PluginDescriptor IdeState
data Log
-- | Find Position in CodeRange. This can fail, if the given
-- position is not covered by the CodeRange.
findPosition :: Position -> CodeRange -> Maybe SelectionRange
instance Prettyprinter.Internal.Pretty Ide.Plugin.CodeRange.Log