ghcide-0.6.0: The core of an IDE
Safe HaskellNone
LanguageHaskell2010

Development.IDE.Spans.LocalBindings

Synopsis

Documentation

data Bindings Source #

The available bindings at every point in a Haskell tree.

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

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

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

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)] Source #

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

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

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