HORIZON HASKELLDocslts/ghc-9.14.x7a6c33e2026-10-12Search packagesCtrl K
Theme: |

GHC 9.14.1 · lts/ghc-9.14.x · 7a6c33e · 2026-10-12

Modulelanguage-c-0.10.2Haskell2010

Language.C.Analysis.AstAnalysis

Analyse the parse tree

Traverses the AST, analyses declarations and invokes handlers.

Contents
  1. Top-level analysis
  2. Building blocks for additional analyses
  3. Type checking
Synopsis
  • Packagelanguage-c-0.10.2
  • Exports12
  • LanguageHaskell2010
  • LicenceBSD-3-Clause
  • SourceAstAnalysis.hs

Top-level analysis

Analyse the given AST

analyseAST ast results in global declaration dictionaries. If you want to perform specific actions on declarations or definitions, you may provide callbacks in the MonadTrav m.

Returns the set of global declarations and definitions which where successfully translated. It is the users responsibility to check whether any hard errors occurred (runTrav does this for you).

Building blocks for additional analyses

Type checking

valuetStmt :: MonadTrav m => [StmtCtx] -> CStat -> m Type

Typecheck a statement, given a statement context. The type of a statement is usually void, but expression statements and blocks can sometimes have other types.