ghcide-2.7.0.0: The core of an IDE
Safe HaskellNone
LanguageGHC2021

Development.IDE.Spans.LocalBindings

Synopsis

Documentation

data Bindings #

The available bindings at every point in a Haskell tree.

Instances

Instances details
Monoid Bindings # 
Instance details

Defined in Development.IDE.Spans.LocalBindings

Semigroup Bindings # 
Instance details

Defined in Development.IDE.Spans.LocalBindings

Show Bindings # 
Instance details

Defined in Development.IDE.Spans.LocalBindings

NFData Bindings # 
Instance details

Defined in Development.IDE.Spans.LocalBindings

Methods

rnf :: Bindings -> () #

getLocalScope :: Bindings -> RealSrcSpan -> [(Name, Maybe Type)] #

Given a Bindings get every identifier in scope at the given RealSrcSpan,

getFuzzyScope :: Bindings -> Position -> Position -> [(Name, Maybe Type)] #

Lookup all names in scope in any span that intersects the interval defined by the two positions. This is meant for use with the fuzzy PositionRange returned by PositionMapping

getDefiningBindings :: Bindings -> RealSrcSpan -> [(Name, Maybe Type)] #

Given a Bindings, get every binding currently active at a given RealSrcSpan,

getFuzzyDefiningBindings :: Bindings -> Position -> Position -> [(Name, Maybe Type)] #

Given a Bindings, get every binding that intersects the interval defined by the two positions. This is meant for use with the fuzzy PositionRange returned by PositionMapping