stan-0.1.2.1: Haskell STatic ANalyser
Copyright(c) 2020 Kowainik
LicenseMPL-2.0
MaintainerKowainik <xrom.xkov@gmail.com>
Safe HaskellSafe-Inferred
LanguageHaskell2010

Stan.Analysis.Visitor

Description

HIE AST visitor for single-pass traversal.

Synopsis

Documentation

data VisitorState Source #

State for the Visitor object that stores all values during a single HIE AST traversal.

getFinalObservations :: HieFile -> Visitor -> Observations Source #

Get sized list of all Observations from the given HIE file using the created Visitor.

addFixity :: Text -> State VisitorState () Source #

Add single operator infix declaration.

addOpDecl :: Text -> RealSrcSpan -> State VisitorState () Source #

Add single operator top-level defintion with its position.

newtype Visitor Source #

Object that implements the Visitor pattern.

Constructors

Visitor 

visitAst :: Visitor -> HieAST TypeIndex -> State VisitorState () Source #

Traverse HIE AST starting from a given node using Visitor.