hsdev-0.3.1.3: Haskell development library

Safe HaskellNone
LanguageHaskell98

HsDev.Symbols.Parsed

Synopsis

Documentation

type Ann = Scoped SrcSpanInfo Source #

Annotation of parsed and resolved nodes

type Parsed = Module Ann Source #

Parsed and resolved module

qnames :: Data (ast Ann) => Traversal' (ast Ann) (QName Ann) Source #

Get all qualified names

names :: Data (ast Ann) => Traversal' (ast Ann) (Name Ann) Source #

Get all names

binders :: Annotated ast => Traversal' (ast Ann) (ast Ann) Source #

Get all binders

locals :: Annotated ast => Traversal' (ast Ann) (ast Ann) Source #

Get all names locally defined

globals :: Annotated ast => Traversal' (ast Ann) (ast Ann) Source #

Get all names, references global symbol

references :: Annotated ast => Traversal' (ast Ann) (ast Ann) Source #

Get all resolved references

unresolveds :: Annotated ast => Traversal' (ast Ann) (ast Ann) Source #

Get all names with not in scope error

usages :: Annotated ast => Name -> Traversal' (ast Ann) (ast Ann) Source #

Get all usages of symbol

named :: Annotated ast => Text -> Traversal' (ast Ann) (ast Ann) Source #

Get usages of symbols with unqualified name

imports :: Data (ast Ann) => Traversal' (ast Ann) (ImportDecl Ann) Source #

Get imports

declarations :: Data (ast Ann) => Traversal' (ast Ann) (Decl Ann) Source #

Get declarations

moduleNames :: Data (ast Ann) => Traversal' (ast Ann) (ModuleName Ann) Source #

Get module names

annL :: Annotated ast => Lens' (ast a) a Source #

Get annotation

symbolL :: Data a => Traversal' a Symbol Source #

Get haskell-names symbols

file :: Annotated ast => Lens' (ast Ann) FilePath Source #

Get source file

pos :: (Annotated ast, SrcInfo isrc, Data isrc) => Lens' (ast isrc) Position Source #

Get source location

defPos :: Annotated ast => Traversal' (ast Ann) Position Source #

Definition position, if binder - returns current position

resolvedName :: Annotated ast => Traversal' (ast Ann) Name Source #

Resolved global name

isBinder :: Annotated ast => ast Ann -> Bool Source #

Does ast node binds something

isLocal :: Annotated ast => ast Ann -> Bool Source #

Does ast node locally defined

isGlobal :: Annotated ast => ast Ann -> Bool Source #

Does ast node reference something

isReference :: Annotated ast => ast Ann -> Bool Source #

Does ast node reference something

isUnresolved :: Annotated ast => ast Ann -> Bool Source #

Is ast node not resolved

resolveError :: Annotated ast => ast Ann -> Maybe String Source #

Resolve error

refsTo :: Annotated ast => Name -> ast Ann -> Bool Source #

Node references to specified symbol

refsToName :: Annotated ast => Text -> ast Ann -> Bool Source #

Node references to specified unqualified name

positionL :: (SrcInfo isrc, Data isrc) => Lens' isrc Position Source #

fileL :: (SrcInfo isrc, Data isrc) => Lens' isrc FilePath Source #

prettyPrint :: Pretty a => a -> String #

pretty-print with the default style and defaultMode.