HORIZON HASKELLDocslts/ghc-9.10.xc74966e2026-09-27Search names, modules, packages, or :: a typeCtrl K

GHC 9.10.3 · lts/ghc-9.10.x · c74966e · 2026-09-27

Modulelanguage-c-0.9.3Haskell2010

Language.C.Analysis.AstAnalysis

Analyse the parse tree

Traverses the AST, analyses declarations and invokes handlers.

  • 2 types
  • 10 values
  • Packagelanguage-c-0.9.3
  • Exports12
  • LanguageHaskell2010
  • LicenceBSD-3-Clause
  • SourceAstAnalysis.hs

Top-level analysis

4 declarations

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).

valueanalyseDecl :: MonadTrav m => Bool -> CDecl -> m ()
#

Analyse a declaration other than a function definition

Note: static assertions are not analysed

Building blocks for additional analyses

2 declarations

Type checking

6 declarations
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.