pprint-coalton-codegen-ast is the pretty-printing wrapper around coalton-codegen-ast.
Syntax
(pprint-coalton-codegen-ast
⟨toplevel-form⟩*)
Semantics
pprint-coalton-codegen-astaccepts the same top-level forms ascoalton-toplevel.- It runs
coalton-codegen-astinside a temporary package with local symbols imported to print the typechecked AST (coalton-impl/typechecker/expression:node-body) for each top-leveldefineto*standard-output*(followed byNIL), and returns zero values(cl:values). - Use it when investigating how Coalton parsed, renamed, and typechecked a definition before dictionary translation and Common Lisp code generation.
Examples
(pprint-coalton-codegen-ast
(declare double (Integer -> Integer))
(define (double x)
(+ x x)))