stan-0.2.0.0: Haskell STatic ANalyser

Copyright | (c) 2020 Kowainik
License | MPL-2.0
Maintainer | Kowainik <xrom.xkov@gmail.com>
Safe Haskell | None
Language | Haskell2010

Stan.Hie.MatchAst

Description

Some `Inspection`s require to know about AST and some mechanism to match parts of syntax tree to the given `PatternAst`. This information on AST expressions is taken from `HIE files` in a more suitable view.

This module contains an implementation of the process of retrieval of AST information from `HIE` files.

Synopsis

- hieMatchPatternAst :: HieFile -> HieAST TypeIndex -> PatternAst -> Bool

# Documentation

hieMatchPatternAst #

Arguments

:: HieFile | HIE file
-> HieAST TypeIndex | Current AST node to match
-> PatternAst | Pattern to match against
-> Bool | `True` if pattern matches AST node

Matching function that matches current AST node with a given pattern.